File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 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> {
252252 /// See the comments in the `parse_path_segment` function for more details.
253253 crate unmatched_angle_bracket_count : u32 ,
254254 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.
255258 crate unclosed_delims : Vec < UnmatchedBrace > ,
256259}
257260
@@ -5830,12 +5833,11 @@ impl<'a> Parser<'a> {
58305833 . span_suggestion (
58315834 span,
58325835 & format ! (
5833- "{}remove extra angle bracket{}" ,
5834- if plural { "" } else { "maybe " } , // account for `S::<u64(3)`
5836+ "remove extra angle bracket{}" ,
58355837 if plural { "s" } else { "" }
58365838 ) ,
58375839 String :: new ( ) ,
5838- Applicability :: MaybeIncorrect ,
5840+ Applicability :: MachineApplicable ,
58395841 )
58405842 . emit ( ) ;
58415843
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ error: unmatched angle bracket
1414 --> $DIR/issue-57819.rs:25:10
1515 |
1616LL | bar::<<<T as Foo>::Output>();
17- | ^ help: maybe remove extra angle bracket
17+ | ^ help: remove extra angle bracket
1818
1919error: unmatched angle brackets
2020 --> $DIR/issue-57819.rs:34:48
@@ -38,7 +38,7 @@ error: unmatched angle bracket
3838 --> $DIR/issue-57819.rs:43:48
3939 |
4040LL | let _ = vec![1, 2, 3].into_iter().collect::<<Vec<usize>>();
41- | ^ help: maybe remove extra angle bracket
41+ | ^ help: remove extra angle bracket
4242
4343error: aborting due to 7 previous errors
4444
You can’t perform that action at this time.
0 commit comments