diff options
Diffstat (limited to '')
-rw-r--r-- | src/tools/clippy/tests/ui-internal/unnecessary_symbol_str.fixed | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui-internal/unnecessary_symbol_str.fixed b/src/tools/clippy/tests/ui-internal/unnecessary_symbol_str.fixed new file mode 100644 index 000000000..6033d06e4 --- /dev/null +++ b/src/tools/clippy/tests/ui-internal/unnecessary_symbol_str.fixed @@ -0,0 +1,21 @@ +// run-rustfix +#![feature(rustc_private)] +#![deny(clippy::internal)] +#![allow( + clippy::borrow_deref_ref, + clippy::unnecessary_operation, + unused_must_use, + clippy::missing_clippy_version_attribute +)] + +extern crate rustc_span; + +use rustc_span::symbol::{Ident, Symbol}; + +fn main() { + Symbol::intern("foo") == rustc_span::sym::clippy; + Symbol::intern("foo") == rustc_span::symbol::kw::SelfLower; + Symbol::intern("foo") != rustc_span::symbol::kw::SelfUpper; + Ident::empty().name == rustc_span::sym::clippy; + rustc_span::sym::clippy == Ident::empty().name; +} |