diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-12-03 17:27:06 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-03 17:27:06 +0100 |
| commit | 453a1a8b7ff049e697bbd15aad2d4674b2825768 (patch) | |
| tree | 30019cf476e0e5d993f14361c95b821c5883f801 /compiler/rustc_span/src | |
| parent | c179a15f7a0a459521022f5aadc10125a33c6efb (diff) | |
| parent | 71b698c0b81c2e35c852ebcdf1f5cbe9e9162a50 (diff) | |
| download | rust-453a1a8b7ff049e697bbd15aad2d4674b2825768.tar.gz rust-453a1a8b7ff049e697bbd15aad2d4674b2825768.zip | |
Rollup merge of #133545 - clubby789:symbol-intern-lit, r=jieyouxu
Lint against Symbol::intern on a string literal Disabled in tests where this doesn't make much sense
Diffstat (limited to 'compiler/rustc_span/src')
| -rw-r--r-- | compiler/rustc_span/src/symbol.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index 77a5140f7ff..47ceab750cf 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -298,6 +298,7 @@ symbols! { Return, Right, Rust, + RustaceansAreAwesome, RustcDecodable, RustcEncodable, RwLock, @@ -316,6 +317,7 @@ symbols! { StructuralPartialEq, SubdiagMessage, Subdiagnostic, + SymbolIntern, Sync, SyncUnsafeCell, T, @@ -377,6 +379,7 @@ symbols! { adt_const_params, advanced_slice_patterns, adx_target_feature, + aes, aggregate_raw_ptr, alias, align, @@ -440,6 +443,7 @@ symbols! { associated_types, assume, assume_init, + asterisk: "*", async_await, async_call, async_call_mut, @@ -521,6 +525,7 @@ symbols! { btreeset_iter, builtin_syntax, c, + c_dash_variadic, c_str, c_str_literals, c_unwind, @@ -651,6 +656,7 @@ symbols! { const_trait_bound_opt_out, const_trait_impl, const_try, + const_ty_placeholder: "<const_ty>", constant, constructor, convert_identity, @@ -780,6 +786,7 @@ symbols! { drop_types_in_const, dropck_eyepatch, dropck_parametricity, + dummy_cgu_name, dylib, dyn_compatible_for_dispatch, dyn_metadata, @@ -923,6 +930,7 @@ symbols! { fmuladdf32, fmuladdf64, fn_align, + fn_body, fn_delegation, fn_must_use, fn_mut, @@ -963,6 +971,7 @@ symbols! { fs_create_dir, fsub_algebraic, fsub_fast, + fsxr, full, fundamental, fused_iterator, @@ -1386,6 +1395,7 @@ symbols! { on, on_unimplemented, opaque, + opaque_module_name_placeholder: "<opaque>", open_options_new, ops, opt_out_copy, @@ -1655,6 +1665,7 @@ symbols! { rust_eh_catch_typeinfo, rust_eh_personality, rust_logo, + rust_out, rustc, rustc_abi, rustc_allocator, @@ -1777,6 +1788,8 @@ symbols! { self_in_typedefs, self_struct_ctor, semitransparent, + sha2, + sha3, sha512_sm_x86, shadow_call_stack, shallow, @@ -1891,6 +1904,7 @@ symbols! { sreg, sreg_low16, sse, + sse2, sse4a_target_feature, stable, staged_api, @@ -2178,6 +2192,7 @@ symbols! { wrapping_sub, wreg, write_bytes, + write_fmt, write_macro, write_str, write_via_move, @@ -2407,6 +2422,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)) } |
