Rollup merge of #27491 - GuillaumeGomez:patch-4, r=Manishearth
This commit is contained in:
commit
6be272cff5
2 changed files with 3 additions and 3 deletions
|
|
@ -313,8 +313,8 @@ fn resolve_error<'b, 'a:'b, 'tcx:'a>(resolver: &'b Resolver<'a, 'tcx>, span: syn
|
|||
},
|
||||
ResolutionError::StructVariantUsedAsFunction(path_name) => {
|
||||
span_err!(resolver.session, span, E0423,
|
||||
"`{}` is a struct variant name, but \
|
||||
this expression \
|
||||
"`{}` is the name of a struct or struct variant, \
|
||||
but this expression \
|
||||
uses it like a function name",
|
||||
path_name);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -14,6 +14,6 @@ struct Monster {
|
|||
|
||||
|
||||
fn main() {
|
||||
let _m = Monster(); //~ ERROR `Monster` is a struct variant name, but
|
||||
let _m = Monster(); //~ ERROR `Monster` is the name of a struct or
|
||||
//~^ HELP did you mean to write: `Monster { /* fields */ }`?
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue