Rollup merge of #111633 - nnethercote:avoid-ref-format, r=WaffleLapkin
Avoid `&format("...")` calls in error message code. Some error message cleanups. Best reviewed one commit at a time. r? `@davidtwco`
This commit is contained in:
commit
08efb9d652
37 changed files with 139 additions and 147 deletions
|
@ -662,7 +662,7 @@ impl<'a> StringReader<'a> {
|
|||
&RUST_2021_PREFIXES_INCOMPATIBLE_SYNTAX,
|
||||
prefix_span,
|
||||
ast::CRATE_NODE_ID,
|
||||
&format!("prefix `{prefix}` is unknown"),
|
||||
format!("prefix `{prefix}` is unknown"),
|
||||
BuiltinLintDiagnostics::ReservedPrefix(prefix_span),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -186,7 +186,7 @@ fn emit_malformed_attribute(
|
|||
suggestions.push(code);
|
||||
}
|
||||
if should_warn(name) {
|
||||
sess.buffer_lint(&ILL_FORMED_ATTRIBUTE_INPUT, span, ast::CRATE_NODE_ID, &msg);
|
||||
sess.buffer_lint(&ILL_FORMED_ATTRIBUTE_INPUT, span, ast::CRATE_NODE_ID, msg);
|
||||
} else {
|
||||
sess.span_diagnostic
|
||||
.struct_span_err(span, error_msg)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue