File tree 2 files changed +7
-5
lines changed
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -252,6 +252,9 @@ pub struct Parser<'a> {
252
252
/// See the comments in the `parse_path_segment` function for more details.
253
253
crate unmatched_angle_bracket_count : u32 ,
254
254
crate max_angle_bracket_count : u32 ,
255
+ /// List of all unclosed delimiters found by the lexer. If an entry is used for error recovery
256
+ /// it gets removed from here. Every entry left at the end gets emitted as an independent
257
+ /// error.
255
258
crate unclosed_delims : Vec < UnmatchedBrace > ,
256
259
}
257
260
@@ -5830,12 +5833,11 @@ impl<'a> Parser<'a> {
5830
5833
. span_suggestion (
5831
5834
span,
5832
5835
& format ! (
5833
- "{}remove extra angle bracket{}" ,
5834
- if plural { "" } else { "maybe " } , // account for `S::<u64(3)`
5836
+ "remove extra angle bracket{}" ,
5835
5837
if plural { "s" } else { "" }
5836
5838
) ,
5837
5839
String :: new ( ) ,
5838
- Applicability :: MaybeIncorrect ,
5840
+ Applicability :: MachineApplicable ,
5839
5841
)
5840
5842
. emit ( ) ;
5841
5843
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ error: unmatched angle bracket
14
14
--> $DIR/issue-57819.rs:25:10
15
15
|
16
16
LL | bar::<<<T as Foo>::Output>();
17
- | ^ help: maybe remove extra angle bracket
17
+ | ^ help: remove extra angle bracket
18
18
19
19
error: unmatched angle brackets
20
20
--> $DIR/issue-57819.rs:34:48
@@ -38,7 +38,7 @@ error: unmatched angle bracket
38
38
--> $DIR/issue-57819.rs:43:48
39
39
|
40
40
LL | let _ = vec![1, 2, 3].into_iter().collect::<<Vec<usize>>();
41
- | ^ help: maybe remove extra angle bracket
41
+ | ^ help: remove extra angle bracket
42
42
43
43
error: aborting due to 7 previous errors
44
44
You can’t perform that action at this time.
0 commit comments