Include the span of attributes of the lhs to the span of the assignment expression
This PR adds the span of attributes of the lhs to the span of the assignment expression. Currently with the following code, `#[attr]` is not included to the span of the assignment (`foo = true`).
```rust
#[attr]
foo = true;
```
The rational behind this change is that as libsyntax user I expect the span of the parent node includes every span of child nodes.
cc https://github.com/rust-lang/rustfmt/issues/3313, https://github.com/rust-lang/rust/issues/15701.
Add NVPTX target to a build manifest
Include `nvptx64-nvidia-cuda` target to a build manifest. I forgot this step at my first take on adding the target (#57937).
Hopefully, this is the only reason why `rustup target add nvptx64-nvidia-cuda` doesn't work 🙁
r? @alexcrichton
proc_macro: make `TokenStream::from_streams` pre-allocate its vector.
This requires a pre-pass over the input streams. But that is cheap compared to the quadratic blowup associated with reallocating the accumulating vector on-the-fly.
Fix#57735
This commit adjusts the span used to label closure return types so that
if the user specifies the return type, i.e. `|_| -> X {}` instead of
`|_| {}`, we correctly highlight all of it and not just the last
character.
Add suggestion for duplicated import.
Fixes#52891.
This PR adds a suggestion when a import is duplicated (ie. the same name
is used twice trying to import the same thing) to remove the second
import.
Initial addition of the Embedded Rust Book
This PR adds the Embedded Rust Book to the bookshelf as a submodule, and adds text for the bookshelf page. I have added a new section after "Master Rust" called "Specialize Rust", with the plan that future domain WG books can also reside here. This now extends the titles down to H3, where formerly only H1 and H2 were used.
The added submodule tracks the master branch of the Embedded WG repo.
If there are additional steps necessary to make this work in CI (perhaps adding this to `src/ci/docker/x86_64-gnu-tools/checktools.sh:32` or so?), please let me know.
CC @steveklabnik @japaric
Also CC issue https://github.com/rust-embedded/wg/issues/257
Some confusion about split popped up at https://news.ycombinator.com/item?id=19080931 since the docs sorta sound like `&str`, `char` and closures are the only types that can be patterns.
cc @steveklabnik