Rollup merge of #98043 - TaKO8Ki:remove-unnecessary-to-string, r=davidtwco
Remove unnecessary `to_string` and `String::new` https://github.com/rust-lang/rust/pull/96468/commits/73fa217bc11fbac76f730223f6766c8e03513b5e changed the type of the `suggestion` argument to `impl ToString`. This patch removes unnecessary `to_string` and `String::new`. cc: `````@davidtwco`````
This commit is contained in:
commit
9d27f2e665
91 changed files with 299 additions and 352 deletions
|
@ -1035,7 +1035,7 @@ fn emit_unstable_in_stable_error(ccx: &ConstCx<'_, '_>, span: Span, gate: Symbol
|
|||
.span_suggestion(
|
||||
attr_span,
|
||||
"if it is not part of the public API, make this function unstably const",
|
||||
concat!(r#"#[rustc_const_unstable(feature = "...", issue = "...")]"#, '\n').to_owned(),
|
||||
concat!(r#"#[rustc_const_unstable(feature = "...", issue = "...")]"#, '\n'),
|
||||
Applicability::HasPlaceholders,
|
||||
)
|
||||
.span_suggestion(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue