You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is one of those bugs where an earlier error is leading to poor error reporting later on in the output. So it should not be considered high priority.
Nonetheless, it would be nice if we could strive for error messages to be sane when considered in isolation, which this example violates:
% rustc /tmp/bug.rs
/tmp/bug.rs:10:13: 10:26 error: mismatched types: expected `vec2` but found `vec3`
/tmp/bug.rs:10 let vec3{y:_,z:_} = self;
^~~~~~~~~~~~~
/tmp/bug.rs:10:13: 10:26 error: struct `vec3` does not have a field named `z`
/tmp/bug.rs:10 let vec3{y:_,z:_} = self;
^~~~~~~~~~~~~
error: aborting due to 2 previous errors
The issue is that the second message claims that vec3 does not have a field named z, but it clearly does. I could understand this message if it said vec2 does not have a field named z.
The text was updated successfully, but these errors were encountered:
This is one of those bugs where an earlier error is leading to poor error reporting later on in the output. So it should not be considered high priority.
Nonetheless, it would be nice if we could strive for error messages to be sane when considered in isolation, which this example violates:
bug.rs
Transcript:
The issue is that the second message claims that
vec3
does not have a field namedz
, but it clearly does. I could understand this message if it said vec2 does not have a field namedz
.The text was updated successfully, but these errors were encountered: