Suggest let for possible binding with ty#111120
Merged
bors merged 5 commits intorust-lang:masterfrom May 9, 2023
Merged
Conversation
Collaborator
|
|
Noratrieb
requested changes
May 7, 2023
Member
Noratrieb
left a comment
There was a problem hiding this comment.
I don't think this is a great place to put it (the error message is very specialized for statements, but the location is pretty generic), I'd prefer it if you found a more specific place. After fixing your ICE locally, this snippet produces the following output:
struct A {
: u8 =,
}error: expected identifier, found `:`
--> uwu.rs:6:5
|
5 | struct A {
| - while parsing this struct
6 | : u8 =,
| ^ expected identifier
|
help: you might have meant to introduce a new binding
|
5 | struct A let {
| +++
which, while this snippet is totally nonsensical, is not very good.
fb956c2 to
05d90bc
Compare
05d90bc to
5e94b5f
Compare
Member
Author
|
@rustbot ready |
Noratrieb
reviewed
May 8, 2023
Member
Noratrieb
left a comment
There was a problem hiding this comment.
That implementation is a lot nicer! r=me after addressing the comment
Member
Author
|
@bors r=Nilstrieb |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 9, 2023
Rollup of 7 pull requests Successful merges: - rust-lang#110304 (Add GNU Property Note) - rust-lang#110504 (Tweak borrow suggestion span) - rust-lang#110583 (tweak "make mut" spans when assigning to locals) - rust-lang#110694 (Implement builtin # syntax and use it for offset_of!(...)) - rust-lang#111120 (Suggest let for possible binding with ty) - rust-lang#111252 (Min specialization improvements) - rust-lang#111361 (Update books) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or 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
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.
Origin from #109128 (comment)
r? @Nilstrieb