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