Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert sub tutorials into Guides #10838 #11106

Merged
merged 1 commit into from
Jan 6, 2014

Conversation

alan-andrade
Copy link
Contributor

  • Moved every the tutorial-*.md into its own directory /doc/guides/
  • Makefile is aware

@brson
Copy link
Contributor

brson commented Dec 22, 2013

Awesome! I think the one other thing that needs to change is that configure needs to be updated to create doc/guides if it doesn't exist.

@emberian
Copy link
Member

@alanandrade seems like the makefile needs more work

# Guides

DOCS += doc/guides/macros.html
doc/guides/macros.html: doc/guides/macros.md doc/version_info.html doc/rust.css \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doc/guides/macros.mdguides/macros.md and so on for each target?

@brson
Copy link
Contributor

brson commented Jan 2, 2014

@alan-andrade Let's try to get this merged for 0.9. Can you address the failures here? Note that #11052 adds a new tutorial so there will need to be a followup to make that a 'guide' as well.

@alan-andrade
Copy link
Contributor Author

@brson This one is ready. I'd like to merge this one before #11123

@adrientetar
Copy link
Contributor

@alan-andrade Looks like you created doc/green and doc/native in your patch with duplicate content. Does it have something to do with libgreen/libnative?

@alan-andrade
Copy link
Contributor Author

@adridu59 not at all. I just rebased with master.

@adrientetar
Copy link
Contributor

@alan-andrade Turns out those two folders are generated files, it has been fixed in b3ae7b1 but your local copy must be older; I would just checkout those folders and the llvm/gyp reverts from the patch.

Edit: must be a rebase fallout then?

@alan-andrade
Copy link
Contributor Author

It might be. I wasn't aware. It'd be fixed by removing those folders ?

@alan-andrade
Copy link
Contributor Author

ohhh I see. ok ok. I'll remove those.

@adrientetar
Copy link
Contributor

I think so. Check the diff and make sure there's no extra content inside and it should be all good.

In case you're not aware, you can look through commit diff with git show <COMMIT_HASH>

@alan-andrade
Copy link
Contributor Author

@adridu59 I believe it's ready.

@@ -1 +1 @@
Subproject commit 1e46da1000bc29679ab4cebf3c1034cb7d6f4487
Subproject commit f407f09c94e00d2d570e8e42114e3f6848b2deb2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a feeling this shouldn't be reverting these submodules. ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@huonw I have no idea what's going on with this files. I'm going to keep the sha of the deleted line.

@alan-andrade
Copy link
Contributor Author

@huonw I appreciate your help. I believe this is the good one.

@alan-andrade
Copy link
Contributor Author

This failure looks weird since guide-macros.md is checked in and it does exist.

I thought I could ssh to verify what's going on, but maybe someone knows what's going on ?

@alexcrichton
Copy link
Member

The reason for that is that the builders run inside of a build directory instead of in the source root. doc/guide-macros.md does not exist because it needs to be coped from ../doc/guide-macros.md (or better yet just used where it came from.

I believe that the best way to do this is to update the dependencies to look like $(S)doc/guide-foo.md

Ensure configure creates doc/guides directory

Fix configure makefile and tests

Remove old guides dir and configure option, convert testing to guide

Remove ignored files

Fix submodule issue

prepend dir in makefile so that bor knows how to build the docs

S to uppercase
@alan-andrade
Copy link
Contributor Author

@cmr typo fixed

bors added a commit that referenced this pull request Jan 6, 2014
… r=cmr

* Moved every the tutorial-*.md into its own directory `/doc/guides/`
* Makefile is aware
@bors bors closed this Jan 6, 2014
@bors bors merged commit eeafee4 into rust-lang:master Jan 6, 2014
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jul 31, 2023
[`unnecessary_literal_unwrap`]: Fix ICE on None.unwrap_or_default()

Fixes rust-lang#11099
Fixes rust-lang#11064

I'm running into rust-lang#11099 (cc `@y21)` on my Rust codebase. Clippy ICEs on this code when evaluating the `unnecessary_literal_unwrap` lint:
```rust
fn main() {
    let val1: u8 = None.unwrap_or_default();
}
```

This fixes that ICE and adds an message specifically for that case:

```
error: used `unwrap_or_default()` on `None` value
  --> $DIR/unnecessary_literal_unwrap.rs:26:5
   |
LL |     None::<String>.unwrap_or_default();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the `None` and `unwrap_or_default()`: `String::default()`
```

This PR also fixes the same ICE with `None.unwrap_or_else` (by giving the generic error message for the lint in that case).

changelog: Fix ICE in `unnecessary_literal_unwrap` on `None.unwrap_or_default()`
flip1995 pushed a commit to flip1995/rust that referenced this pull request Aug 17, 2023
[`unnecessary_literal_unwrap`]: Fix ICE on None.unwrap_or_default()

Fixes rust-lang#11099
Fixes rust-lang#11064

I'm running into rust-lang#11099 (cc `@y21)` on my Rust codebase. Clippy ICEs on this code when evaluating the `unnecessary_literal_unwrap` lint:
```rust
fn main() {
    let val1: u8 = None.unwrap_or_default();
}
```

This fixes that ICE and adds an message specifically for that case:

```
error: used `unwrap_or_default()` on `None` value
  --> $DIR/unnecessary_literal_unwrap.rs:26:5
   |
LL |     None::<String>.unwrap_or_default();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the `None` and `unwrap_or_default()`: `String::default()`
```

This PR also fixes the same ICE with `None.unwrap_or_else` (by giving the generic error message for the lint in that case).

changelog: Fix ICE in `unnecessary_literal_unwrap` on `None.unwrap_or_default()`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants