Skip to content

Commit 813f00d

Browse files
committed
fix a suggestion message
1 parent bdc3177 commit 813f00d

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

compiler/rustc_parse/src/parser/item.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1538,7 +1538,7 @@ impl<'a> Parser<'a> {
15381538
self.struct_span_err(self.token.span, "found single colon in a struct field type path")
15391539
.span_suggestion_verbose(
15401540
self.token.span,
1541-
"maybe you meant to write a path separator here",
1541+
"write a path separator here",
15421542
"::".to_string(),
15431543
Applicability::MaybeIncorrect,
15441544
)

src/test/ui/suggestions/sturct-field-type-including-single-colon.stderr src/test/ui/suggestions/struct-field-type-including-single-colon.stderr

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
error: found single colon in a struct field type path
2-
--> $DIR/sturct-field-type-including-single-colon.rs:9:11
2+
--> $DIR/struct-field-type-including-single-colon.rs:9:11
33
|
44
LL | a: foo:A,
55
| ^
66
|
7-
help: maybe you meant to write a path separator here
7+
help: write a path separator here
88
|
99
LL | a: foo::A,
1010
| ~~
1111

1212
error: expected `,`, or `}`, found `:`
13-
--> $DIR/sturct-field-type-including-single-colon.rs:9:11
13+
--> $DIR/struct-field-type-including-single-colon.rs:9:11
1414
|
1515
LL | a: foo:A,
1616
| ^
1717

1818
error: found single colon in a struct field type path
19-
--> $DIR/sturct-field-type-including-single-colon.rs:15:16
19+
--> $DIR/struct-field-type-including-single-colon.rs:15:16
2020
|
2121
LL | b: foo::bar:B,
2222
| ^
2323
|
24-
help: maybe you meant to write a path separator here
24+
help: write a path separator here
2525
|
2626
LL | b: foo::bar::B,
2727
| ~~
2828

2929
error: expected `,`, or `}`, found `:`
30-
--> $DIR/sturct-field-type-including-single-colon.rs:15:16
30+
--> $DIR/struct-field-type-including-single-colon.rs:15:16
3131
|
3232
LL | b: foo::bar:B,
3333
| ^

0 commit comments

Comments
 (0)