.span_suggestion_short(
attr.span,
suggestion.unwrap_or("remove this attribute"),
- String::new(),
+ "",
Applicability::MachineApplicable,
)
.emit();
.span_suggestion_short(
no_mangle_attr.span,
"remove this attribute",
- String::new(),
+ "",
// Use of `#[no_mangle]` suggests FFI intent; correct
// fix may be to monomorphize source by hand
Applicability::MaybeIncorrect,
err.span_suggestion(
const_span,
"try a static value",
- "pub static".to_owned(),
+ "pub static",
Applicability::MachineApplicable,
);
err.emit();
err.span_suggestion(
vis_span,
"consider restricting its visibility",
- "pub(crate)".to_owned(),
+ "pub(crate)",
applicability,
);
if exportable {
err.span_suggestion(
type_alias_generics.where_clause_span,
"the clause will not be checked when the type alias is used, and should be removed",
- String::new(),
+ "",
Applicability::MachineApplicable,
);
if !suggested_changing_assoc_types {
});
}
} else {
- let replace = "..=".to_owned();
+ let replace = "..=";
if join.edition() >= Edition::Edition2021 {
let mut err =
rustc_errors::struct_span_err!(cx.sess(), pat.span, E0783, "{}", msg,);