mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-12 08:36:03 +00:00
Updated E0422 to new error message
This commit is contained in:
parent
e25542cb02
commit
d2e78956c3
@ -317,11 +317,13 @@ fn resolve_struct_error<'b, 'a: 'b, 'c>(resolver: &'b Resolver<'a>,
|
||||
err
|
||||
}
|
||||
ResolutionError::DoesNotNameAStruct(name) => {
|
||||
struct_span_err!(resolver.session,
|
||||
let mut err = struct_span_err!(resolver.session,
|
||||
span,
|
||||
E0422,
|
||||
"`{}` does not name a structure",
|
||||
name)
|
||||
name);
|
||||
err.span_label(span, &format!("not a structure"));
|
||||
err
|
||||
}
|
||||
ResolutionError::StructVariantUsedAsFunction(path_name) => {
|
||||
struct_span_err!(resolver.session,
|
||||
|
@ -9,5 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
fn main () {
|
||||
let x = Foo { x: 1, y: 2 }; //~ ERROR E0422
|
||||
let x = Foo { x: 1, y: 2 };
|
||||
//~^ ERROR E0422
|
||||
//~| NOTE not a structure
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user