diff options
| author | bors <bors@rust-lang.org> | 2022-06-13 19:36:41 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-06-13 19:36:41 +0000 |
| commit | ca122c7ebb3ab50149c9d3d24ddb59c252b32272 (patch) | |
| tree | b921955614c8c29e5c1bf05e60f58be7012c1806 /compiler/rustc_parse/src/parser/path.rs | |
| parent | 083721a1a7365d3afe1521cd2661b2201aac0450 (diff) | |
| parent | af1f6144d8b742fe6dd5dea97cc41feee83f47e3 (diff) | |
| download | rust-ca122c7ebb3ab50149c9d3d24ddb59c252b32272.tar.gz rust-ca122c7ebb3ab50149c9d3d24ddb59c252b32272.zip | |
Auto merge of #98066 - matthiaskrgr:rollup-wb9gs92, r=matthiaskrgr
Rollup of 10 pull requests Successful merges: - #97709 (Normalize consts' tys when relating with `adt_const_params`) - #97875 (Remove the `infer_static_outlives_requirements` feature) - #97960 (interpret: unify offset_from check with offset check) - #97999 (Make `type_changing_struct_update` no longer an incomplete feature) - #98043 (Remove unnecessary `to_string` and `String::new`) - #98044 ([issues:97981] del unrelated comment) - #98049 (Document an edge case of `str::split_once`) - #98050 (Add some more regression tests for #67945) - #98054 (Fix error message for `download-ci-llvm`) - #98057 (Update miri) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src/parser/path.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/path.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_parse/src/parser/path.rs b/compiler/rustc_parse/src/parser/path.rs index 5c6fb376cd4..da46af60f72 100644 --- a/compiler/rustc_parse/src/parser/path.rs +++ b/compiler/rustc_parse/src/parser/path.rs @@ -112,7 +112,7 @@ impl<'a> Parser<'a> { .span_suggestion( self.prev_token.span, "use double colon", - "::".to_string(), + "::", Applicability::MachineApplicable, ) .emit(); @@ -283,7 +283,7 @@ impl<'a> Parser<'a> { err.span_suggestion_verbose( arg.span().shrink_to_hi(), "you might have meant to end the type parameters here", - ">".to_string(), + ">", Applicability::MaybeIncorrect, ); } @@ -455,7 +455,7 @@ impl<'a> Parser<'a> { "remove extra angle bracket{}", pluralize!(snapshot.unmatched_angle_bracket_count) ), - String::new(), + "", Applicability::MachineApplicable, ) .emit(); @@ -489,7 +489,7 @@ impl<'a> Parser<'a> { err.span_suggestion_verbose( self.prev_token.span.until(self.token.span), "use a comma to separate type parameters", - ", ".to_string(), + ", ", Applicability::MachineApplicable, ); err.emit(); @@ -592,13 +592,13 @@ impl<'a> Parser<'a> { err.span_suggestion( self.sess.source_map().next_point(eq).to(before_next), "to constrain the associated type, add a type after `=`", - " TheType".to_string(), + " TheType", Applicability::HasPlaceholders, ); err.span_suggestion( eq.to(before_next), &format!("remove the `=` if `{}` is a type", ident), - String::new(), + "", Applicability::MaybeIncorrect, ) } else { |
