Skip to content

Commit

Permalink
fix a suggestion message
Browse files Browse the repository at this point in the history
  • Loading branch information
TaKO8Ki committed Mar 11, 2022
1 parent bdc3177 commit 813f00d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_parse/src/parser/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
| ^
Expand Down

0 comments on commit 813f00d

Please sign in to comment.