]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_parse/src/parser/item.rs
Rollup merge of #96390 - GuillaumeGomez:es6-part2, r=notriddle
[rust.git] / compiler / rustc_parse / src / parser / item.rs
index 746861933d2f0493a5963e92d4c157880faedf6f..10f1daf11295107540cd1d6d180741c3db06c49d 100644 (file)
@@ -332,7 +332,7 @@ fn recover_missing_kw_before_item(&mut self) -> PResult<'a, ()> {
             err.span_suggestion_short(
                 sp,
                 &msg,
-                " struct ".into(),
+                " struct ",
                 Applicability::MaybeIncorrect, // speculative
             );
             Err(err)
@@ -532,13 +532,13 @@ fn parse_item_impl(
                 .span_suggestion(
                     span,
                     "add a trait here",
-                    " Trait ".into(),
+                    " Trait ",
                     Applicability::HasPlaceholders,
                 )
                 .span_suggestion(
                     span.to(self.token.span),
                     "for an inherent impl, drop this `for`",
-                    "".into(),
+                    "",
                     Applicability::MaybeIncorrect,
                 )
                 .emit();
@@ -1459,7 +1459,7 @@ fn parse_single_struct_field(
                         err.span_suggestion(
                             sp,
                             "missing comma here",
-                            ",".into(),
+                            ",",
                             Applicability::MachineApplicable,
                         );
                     }
@@ -1498,7 +1498,7 @@ fn parse_single_struct_field(
                     err.span_suggestion(
                         sp,
                         "try adding a comma",
-                        ",".into(),
+                        ",",
                         Applicability::MachineApplicable,
                     );
                     err.emit();