diff options
| author | Takayuki Maeda <takoyaki0316@gmail.com> | 2022-07-20 18:19:25 +0900 |
|---|---|---|
| committer | Takayuki Maeda <takoyaki0316@gmail.com> | 2022-07-20 18:19:25 +0900 |
| commit | 57a155b9faf480ae0d1cc46ffc4b5e1a468bc65c (patch) | |
| tree | 20e9375f4da5b205b5d724542d39663d9763ed7b | |
| parent | 9a7b7d5e50ab0b59c6d349bbf005680a7c880e98 (diff) | |
| download | rust-57a155b9faf480ae0d1cc46ffc4b5e1a468bc65c.tar.gz rust-57a155b9faf480ae0d1cc46ffc4b5e1a468bc65c.zip | |
avoid a `Symbol` to `String` conversion
| -rw-r--r-- | compiler/rustc_builtin_macros/src/format.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_lint_defs/src/lib.rs | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/compiler/rustc_builtin_macros/src/format.rs b/compiler/rustc_builtin_macros/src/format.rs index 3b7e2102ffa..2d1fd81c32f 100644 --- a/compiler/rustc_builtin_macros/src/format.rs +++ b/compiler/rustc_builtin_macros/src/format.rs @@ -1004,9 +1004,7 @@ fn lint_named_arguments_used_positionally( node_id: ast::CRATE_NODE_ID, lint_id: LintId::of(&NAMED_ARGUMENTS_USED_POSITIONALLY), diagnostic: BuiltinLintDiagnostics::NamedArgumentUsedPositionally( - arg_span, - span, - symbol.to_string(), + arg_span, span, symbol, ), }); } diff --git a/compiler/rustc_lint_defs/src/lib.rs b/compiler/rustc_lint_defs/src/lib.rs index 4fd57ed8533..3872d866dee 100644 --- a/compiler/rustc_lint_defs/src/lib.rs +++ b/compiler/rustc_lint_defs/src/lib.rs @@ -467,7 +467,7 @@ pub enum BuiltinLintDiagnostics { /// If true, the lifetime will be fully elided. use_span: Option<(Span, bool)>, }, - NamedArgumentUsedPositionally(Option<Span>, Span, String), + NamedArgumentUsedPositionally(Option<Span>, Span, Symbol), } /// Lints that are buffered up early on in the `Session` before the |
