diff options
| author | clubby789 <jamie@hill-daniel.co.uk> | 2024-11-27 17:21:59 +0000 |
|---|---|---|
| committer | clubby789 <jamie@hill-daniel.co.uk> | 2024-11-28 15:45:25 +0000 |
| commit | 72d2db7bf46f565f4ee5cc73d65b4f4906e7420e (patch) | |
| tree | cc99fa78c866bf03bb01acd2df7d33d6f5337bce /compiler/rustc_span | |
| parent | c322cd5c5ac13b5ef16a487c889f8c148d8e3841 (diff) | |
Implement lint against `Symbol::intern` on a string literal
Diffstat (limited to 'compiler/rustc_span')
| -rw-r--r-- | compiler/rustc_span/src/symbol.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index 5252c446e1d..bbbfb51b078 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -315,6 +315,7 @@ symbols! { StructuralPartialEq, SubdiagMessage, Subdiagnostic, + SymbolIntern, Sync, SyncUnsafeCell, T, @@ -2401,6 +2402,7 @@ impl Symbol { } /// Maps a string to its interned representation. + #[rustc_diagnostic_item = "SymbolIntern"] pub fn intern(string: &str) -> Self { with_session_globals(|session_globals| session_globals.symbol_interner.intern(string)) } |
