Skip to content

Commit 57a155b

Browse files
committed
avoid a Symbol to String conversion
1 parent 9a7b7d5 commit 57a155b

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

compiler/rustc_builtin_macros/src/format.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,9 +1004,7 @@ fn lint_named_arguments_used_positionally(
10041004
node_id: ast::CRATE_NODE_ID,
10051005
lint_id: LintId::of(&NAMED_ARGUMENTS_USED_POSITIONALLY),
10061006
diagnostic: BuiltinLintDiagnostics::NamedArgumentUsedPositionally(
1007-
arg_span,
1008-
span,
1009-
symbol.to_string(),
1007+
arg_span, span, symbol,
10101008
),
10111009
});
10121010
}

compiler/rustc_lint_defs/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ pub enum BuiltinLintDiagnostics {
467467
/// If true, the lifetime will be fully elided.
468468
use_span: Option<(Span, bool)>,
469469
},
470-
NamedArgumentUsedPositionally(Option<Span>, Span, String),
470+
NamedArgumentUsedPositionally(Option<Span>, Span, Symbol),
471471
}
472472

473473
/// Lints that are buffered up early on in the `Session` before the

0 commit comments

Comments
 (0)