diff --git a/compiler/rustc_parse/src/parser/item.rs b/compiler/rustc_parse/src/parser/item.rs index 423ce7c354c3ff71dc29e44f60a15211ae2ac882..ec89301c1e22edf17358721a99c63179ee207dcf 100644 --- a/compiler/rustc_parse/src/parser/item.rs +++ b/compiler/rustc_parse/src/parser/item.rs @@ -1538,7 +1538,7 @@ fn parse_name_and_ty( self.struct_span_err(self.token.span, "found single colon in a struct field type path") .span_suggestion_verbose( self.token.span, - "maybe you meant to write a path separator here", + "write a path separator here", "::".to_string(), Applicability::MaybeIncorrect, ) diff --git a/src/test/ui/suggestions/sturct-field-type-including-single-colon.rs b/src/test/ui/suggestions/struct-field-type-including-single-colon.rs similarity index 100% rename from src/test/ui/suggestions/sturct-field-type-including-single-colon.rs rename to src/test/ui/suggestions/struct-field-type-including-single-colon.rs diff --git a/src/test/ui/suggestions/sturct-field-type-including-single-colon.stderr b/src/test/ui/suggestions/struct-field-type-including-single-colon.stderr similarity index 60% rename from src/test/ui/suggestions/sturct-field-type-including-single-colon.stderr rename to src/test/ui/suggestions/struct-field-type-including-single-colon.stderr index 7566ca23472a9c1e1ebe17aa4cf4630eb0f6aac0..189759d64fc4ee59d24e8e21d0121bd81e1ffc9c 100644 --- a/src/test/ui/suggestions/sturct-field-type-including-single-colon.stderr +++ b/src/test/ui/suggestions/struct-field-type-including-single-colon.stderr @@ -1,33 +1,33 @@ error: found single colon in a struct field type path - --> $DIR/sturct-field-type-including-single-colon.rs:9:11 + --> $DIR/struct-field-type-including-single-colon.rs:9:11 | LL | a: foo:A, | ^ | -help: maybe you meant to write a path separator here +help: write a path separator here | LL | a: foo::A, | ~~ error: expected `,`, or `}`, found `:` - --> $DIR/sturct-field-type-including-single-colon.rs:9:11 + --> $DIR/struct-field-type-including-single-colon.rs:9:11 | LL | a: foo:A, | ^ error: found single colon in a struct field type path - --> $DIR/sturct-field-type-including-single-colon.rs:15:16 + --> $DIR/struct-field-type-including-single-colon.rs:15:16 | LL | b: foo::bar:B, | ^ | -help: maybe you meant to write a path separator here +help: write a path separator here | LL | b: foo::bar::B, | ~~ error: expected `,`, or `}`, found `:` - --> $DIR/sturct-field-type-including-single-colon.rs:15:16 + --> $DIR/struct-field-type-including-single-colon.rs:15:16 | LL | b: foo::bar:B, | ^