]> git.lizzy.rs Git - rust.git/blob - tests/ui-internal/unnecessary_symbol_str.rs
Auto merge of #8906 - rust-lang:copy-large-enum-variants, r=Jarcho
[rust.git] / tests / ui-internal / unnecessary_symbol_str.rs
1 // run-rustfix
2 #![feature(rustc_private)]
3 #![deny(clippy::internal)]
4 #![allow(
5     clippy::borrow_deref_ref,
6     clippy::unnecessary_operation,
7     unused_must_use,
8     clippy::missing_clippy_version_attribute
9 )]
10
11 extern crate rustc_span;
12
13 use rustc_span::symbol::{Ident, Symbol};
14
15 fn main() {
16     Symbol::intern("foo").as_str() == "clippy";
17     Symbol::intern("foo").to_string() == "self";
18     Symbol::intern("foo").to_ident_string() != "Self";
19     &*Ident::empty().as_str() == "clippy";
20     "clippy" == Ident::empty().to_string();
21 }