2 #![deny(clippy::internal)]
3 #![feature(rustc_private)]
5 extern crate rustc_span;
7 use rustc_span::symbol::Symbol;
11 rustc_span::symbol::Symbol::intern(stringify!($tt))
16 // Direct use of Symbol::intern
17 let _ = rustc_span::sym::f32;
20 let _ = rustc_span::sym::f32;
22 // Correct suggestion when symbol isn't stringified constant name
23 let _ = rustc_span::sym::proc_dash_macro;
25 // interning a keyword
26 let _ = rustc_span::symbol::kw::SelfLower;
28 // Interning a symbol that is not defined
29 let _ = Symbol::intern("xyz123");
32 // Using a different `intern` function
33 let _ = intern("f32");