summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui-internal/unnecessary_symbol_str.fixed
blob: eb79fdbc4b4c8afde5f1d5218336c4eee7d18819 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#![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;
}