mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-13 12:36:47 +00:00
fix a suggestion message
This commit is contained in:
parent
bdc3177868
commit
813f00dd4f
@ -1538,7 +1538,7 @@ impl<'a> Parser<'a> {
|
||||
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,
|
||||
)
|
||||
|
@ -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,
|
||||
| ^
|
Loading…
Reference in New Issue
Block a user