mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-16 09:48:08 +00:00
16 lines
453 B
Rust
16 lines
453 B
Rust
// run-rustfix
|
|
#![feature(rustc_private)]
|
|
#![deny(clippy::internal)]
|
|
#![allow(clippy::unnecessary_operation, unused_must_use)]
|
|
|
|
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";
|
|
&*Ident::invalid().as_str() == "clippy";
|
|
"clippy" == Ident::invalid().to_string();
|
|
}
|