Closed
Description
struct Feelings {
owo: bool
#[allow(unused)] // If commented-out, we recover differently and do not get the additional error about no field `owo`
uwu: bool,
}
impl Feelings {
fn hmm(&self) -> bool {
self.owo
}
}
Having an attribute after the field with missing ,
turns the error from this (which is good):
Compiling playground v0.0.1 (/playground)
error: expected `,`, or `}`, found `uwu`
--> src/main.rs:2:14
|
2 | owo: bool
| ^ help: try adding a comma: `,`
error: could not compile `playground` due to previous error
To this, which contains unhelpful errors and possibly a huge number of them on a larger codebase:
Compiling playground v0.0.1 (/playground)
error: expected `,`, or `}`, found `#`
--> src/main.rs:2:14
|
2 | owo: bool
| ^
error[E0609]: no field `owo` on type `&Feelings`
--> src/main.rs:9:14
|
9 | self.owo
| ^^^ unknown field
For more information about this error, try `rustc --explain E0609`.
error: could not compile `playground` due to 2 previous errors