-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Rollup of 5 pull requests #37450
Merged
Merged
Rollup of 5 pull requests #37450
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I had it a couple of times that I was missing the "extern crate" line after I introduced a new dependency. So I copied the text from the message and inserted it into the beginning of my code, only to find the compiler complaining that I was missing the semicolon. (I forgot to add it after the text that I had pasted.) There's a similar message which does include the semicolon, namely "help: you can import it into scope: `use foo::Bar;`". I think the two messages should be consistent, so this change adds it for "extern crate".
The Write impls for &[u8] and Vec<u8> are quite different, and we need this to be reflected in the docs. These documentation comments will be visible on the respective type's page in the trait impls section.
This fixes a problem in save-analysis where it mistakes a path to a variant as the variant itself.
Fix bad error message with `::<` in types Fix rust-lang#36116. Before: ```rust error: expected identifier, found `<` --> src/test/compile-fail/issue-36116.rs:16:52 | 16 | let f = Some(Foo { _a: 42 }).map(|a| a as Foo::<i32>); | ^ error: chained comparison operators require parentheses --> src/test/compile-fail/issue-36116.rs:16:52 | 16 | let f = Some(Foo { _a: 42 }).map(|a| a as Foo::<i32>); | ^^^^^^ | = help: use `::<...>` instead of `<...>` if you meant to specify type arguments error: expected expression, found `)` --> src/test/compile-fail/issue-36116.rs:16:57 | 16 | let f = Some(Foo { _a: 42 }).map(|a| a as Foo::<i32>); | ^ error: expected identifier, found `<` --> src/test/compile-fail/issue-36116.rs:20:17 | 20 | let g: Foo::<i32> = Foo { _a: 42 }; | ^ error: aborting due to 5 previous errors ``` After: ```rust error: unexpected token: `::` --> src/test/compile-fail/issue-36116.rs:16:50 | 16 | let f = Some(Foo { _a: 42 }).map(|a| a as Foo::<i32>); | ^^ | = help: use `<...>` instead of `::<...>` if you meant to specify type arguments error: unexpected token: `::` --> src/test/compile-fail/issue-36116.rs:20:15 | 20 | let g: Foo::<i32> = Foo { _a: 42 }; | ^^ | = help: use `<...>` instead of `::<...>` if you meant to specify type arguments error: aborting due to 2 previous errors ```
Add documentation for Read, Write impls for slices and Vec The Write imps for &[u8] and Vec<u8> are quite different, and we need this to be reflected in the docs. These documentation comments will be visible on the respective type's page in the trait impls section.
…emicolon, r=eddyb Add semicolon to "Maybe a missing `extern crate foo`" message I had it a couple of times that I was missing the "extern crate" line after I introduced a new dependency. So I copied the text from the message and inserted it into the beginning of my code, only to find the compiler complaining that I was missing the semicolon. (I forgot to add it after the text that I had pasted.) There's a similar message which does include the semicolon, namely "help: you can import it into scope: `use foo::Bar;`". I think the two messages should be consistent, so this change adds it for "extern crate".
Give variant spans used in derives the correct expansion id This fixes a problem in save-analysis where it mistakes a path to a variant as the variant itself. r? @petrochenkov
…eklabnik reference: Mention --crate-type=cdylib in the Linkage section This option is missing in the docs! :)
(rust_highfive has picked a reviewer for you, use r? to override) |
@bors: r+ p=1 |
📌 Commit 61e765a has been approved by |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
::<
in types #36206, Add documentation for Read, Write impls for slices and Vec #37343, Add semicolon to "Maybe a missingextern crate foo
" message #37430, Give variant spans used in derives the correct expansion id #37436, reference: Mention --crate-type=cdylib in the Linkage section #37441