avoid a &str to String conversion

This commit is contained in:
Takayuki Maeda 2022-08-17 04:58:26 +09:00
parent 22c8c9c401
commit 3a1aa376c5

View file

@ -1988,7 +1988,7 @@ impl<'a> Parser<'a> {
err.span_suggestion(
span,
"declare the type after the parameter binding",
String::from("<identifier>: <type>"),
"<identifier>: <type>",
Applicability::HasPlaceholders,
);
} else if require_name && is_trait_item {