2 #![deny(clippy::internal)]
3 #![allow(clippy::missing_clippy_version_attribute, clippy::let_unit_value)]
4 #![feature(rustc_private)]
6 extern crate rustc_span;
8 use rustc_span::symbol::Symbol;
12 rustc_span::symbol::Symbol::intern(stringify!($tt))
17 // Direct use of Symbol::intern
18 let _ = rustc_span::sym::f32;
21 let _ = rustc_span::sym::f32;
23 // Correct suggestion when symbol isn't stringified constant name
24 let _ = rustc_span::sym::proc_dash_macro;
26 // interning a keyword
27 let _ = rustc_span::symbol::kw::SelfLower;
29 // Interning a symbol that is not defined
30 let _ = Symbol::intern("xyz123");
33 // Using a different `intern` function
34 let _ = intern("f32");