2023-04-23 11:03:09 +00:00
|
|
|
//@run-rustfix
|
2021-01-15 09:56:44 +00:00
|
|
|
#![feature(rustc_private)]
|
|
|
|
#![deny(clippy::internal)]
|
2021-12-06 11:33:31 +00:00
|
|
|
#![allow(
|
2022-06-04 11:34:07 +00:00
|
|
|
clippy::borrow_deref_ref,
|
2021-12-06 11:33:31 +00:00
|
|
|
clippy::unnecessary_operation,
|
|
|
|
unused_must_use,
|
|
|
|
clippy::missing_clippy_version_attribute
|
|
|
|
)]
|
2021-01-15 09:56:44 +00:00
|
|
|
|
|
|
|
extern crate rustc_span;
|
|
|
|
|
|
|
|
use rustc_span::symbol::{Ident, Symbol};
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
Symbol::intern("foo").as_str() == "clippy";
|
|
|
|
Symbol::intern("foo").to_string() == "self";
|
|
|
|
Symbol::intern("foo").to_ident_string() != "Self";
|
2021-10-17 20:20:30 +00:00
|
|
|
&*Ident::empty().as_str() == "clippy";
|
|
|
|
"clippy" == Ident::empty().to_string();
|
2021-01-15 09:56:44 +00:00
|
|
|
}
|