Update books
## reference
2 commits in 862b669c395822bb0938781d74f860e5762ad4fb..f8ae436d936f6f4891d3c1bbb1af5865eb8aeadb
2019-05-04 23:41:35 -0700 to 2019-05-31 14:59:12 +0200
- Document that literals with any suffixes are valid as tokens (rust-lang-nursery/reference#612)
- Fix example code of derive macro (rust-lang-nursery/reference#611)
## book
2 commits in 29fe982990e43b9367be0ff47abc82fb2123fd03..62a8c6f25fbd981c80a046f3b04be9684749af3b
2019-05-15 17:48:40 -0400 to 2019-05-28 15:48:23 -0400
- Remove snapshots checked in layout
- Remove snapshots that I've approved in layout
## rust-by-example
5 commits in 811c697b232c611ed754d279ed20643a0c4096f6..18566f4dedc3ef5bf61f5f85685d5966db99cc11
2019-04-28 18:56:42 -0300 to 2019-05-30 19:23:24 -0300
- Fixed wording in the `Seconds` struct description. (rust-lang/rust-by-example#1195)
- Fix usage of the word "elision" (rust-lang/rust-by-example#1191)
- Reword "Flow Control" to "Flow of Control" (rust-lang/rust-by-example#1190)
- Copy edits to chapter 1 (rust-lang/rust-by-example#1189)
- Fix typo in a mod/visibility.md (rust-lang/rust-by-example#1188)
## rustc-guide
9 commits in 3cb727b62b953d59b4360d39aa68b6dc8f157655..3ac9cfc9c9ab2e366feebf18718112737f572352
2019-05-07 09:53:32 -0500 to 2019-06-02 19:36:58 -0500
- Update information about debuginfo configuration
- fix long line
- Fixed misspelling
- Add more info subsection with links to forge and rustc api docs (rust-lang/rustc-guide#324)
- Renamed the file and title of the diagnostics chapter.
- Added rustc phases diagram and explanation
- Mention running tests for subdirectories
- Fixed links broken by merging chalks rules and solve
- Add documentation about profile-guided optimization.
## embedded-book
1 commits in 9858872bd1b7dbba5ec27dc30d34eba00acd7ef9..f0c75b75f9c18537b78f5d17c1015247e9a49c86
2019-05-02 18:56:54 +0000 to 2019-06-03 10:49:02 +0000
- Qemu md changes (rust-embedded/book#193)
It was commented out as part of
8a8e497ae7.
Done probably by accident, since the code in question was moved to a
match arm, along with newly introduced logic to detect bare CRs in raw
strings.
checktools: unify grepping the TOOLSTATE file
The file was grepped twice but in a different way. This unifies the code to make sure it is consistent. Or were these deliberately not doing the same thing? That seems strange though.
I wouldn't know how to test these changes.
Make `i*::signum` a `const fn`.
Ticks a box in #53718.
This uses a well-known branchless implementation of `signum`: `(n > 0) as i32 - (n < 0) as i32`.
Here's a [playground](https://play.rust-lang.org/?version=nightly&mode=release&edition=2018&gist=747cf191c4974bf66c9d75e509ae6e6e) comparing the two techniques. On x86 in release mode, the branchless implementation is able to replace a `mov` and `cmov` with a `sar` and `add`, so this should be a bit faster as well.
~~This is marked as a draft since I think I'll need to add `#[rustc_const_unstable]` somewhere. Perhaps the reviewer can point me in the right direction.~~
Rollup of 7 pull requests
Successful merges:
- #61223 (Document tuple's Ord behavior as sequential)
- #61615 (syntax: Treat error literals in more principled way)
- #61616 (parser: Remove `Deref` impl from `Parser`)
- #61621 (Clarify when we run steps with ONLY_HOSTS)
- #61627 (Add regression test for #61452.)
- #61641 (Revert "Make LocalAnalizer visitor iterate instead of recurse")
- #61647 (Use stable wrappers in f32/f64::signum)
Failed merges:
r? @ghost
parser: Remove `Deref` impl from `Parser`
Follow up to https://github.com/rust-lang/rust/pull/61541
You have to write `self.token.span` instead of `self.span` in the parser now, which is not nice, but not too bad either, I guess.
Not sure.
Probably still better than people using both and being confused about the definition point of `span`.
r? @oli-obk @estebank
syntax: Treat error literals in more principled way
Free them from their character literal origins.
I actually tried to remove `LitKind::Err` entirely (by converting it into `ExprKind::Err` immediately), and it caused no diagnostic regressions in the test suite.
However, I'd still want to use error literals as general purpose error tokens some day, so I kept them.
The downside of having `LitKind::Err` in addition to `ExprKind::Err` is that every time you want to do something with `ExprKind::Err` you need to make sure that `ExprKind::Lit(LitKind::Err)` is treated in the same way.
Fortunately, this usually happens automatically because both literals and errors are "leaf" expressions, however this PR does fix a couple of inconsistencies between them.
Addresses https://github.com/rust-lang/rust/pull/60679#discussion_r282640663 in a way