about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs23
1 files changed, 4 insertions, 19 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 949033b6a5e..c1dd75b47c8 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -1170,23 +1170,7 @@ impl<'a> Parser<'a> {
 
                 Ok(())
             },
-            None => {
-                match (
-                    &self.token,
-                    self.unmatched_angle_bracket_count,
-                    self.max_angle_bracket_count > 1,
-                ) {
-                    // (token::OpenDelim(_), 1, true) | (token::Semi, 1, true) => {
-                    //     self.struct_span_err(
-                    //         self.span,
-                    //         &format!("expected `>`, found `{}`", self.this_token_to_string()),
-                    //     // ).span_suggestion_short(
-                    //     ).emit();
-                    //     Ok(())
-                    // }
-                    _ => self.unexpected(),
-                }
-            }
+            None => self.unexpected(),
         }
     }
 
@@ -5846,11 +5830,12 @@ impl<'a> Parser<'a> {
                     .span_suggestion(
                         span,
                         &format!(
-                            "remove extra angle bracket{}",
+                            "{}remove extra angle bracket{}",
+                            if plural { "" } else { "maybe " }, // account for `S::<u64(3)`
                             if plural { "s" } else { "" }
                         ),
                         String::new(),
-                        Applicability::MachineApplicable,
+                        Applicability::MaybeIncorrect,
                     )
                     .emit();