-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Suggest let for possible binding with ty #111120
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@rustbot ready |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That implementation is a lot nicer! r=me after addressing the comment
@bors r=Nilstrieb |
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
Origin from #109128 (comment)
r? @Nilstrieb