summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui-internal/unnecessary_symbol_str.stderr
blob: a1f507f331d26c5cb7545fd98817c5a575495b8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
error: unnecessary `Symbol` to string conversion
  --> $DIR/unnecessary_symbol_str.rs:16:5
   |
LL |     Symbol::intern("foo").as_str() == "clippy";
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Symbol::intern("foo") == rustc_span::sym::clippy`
   |
note: the lint level is defined here
  --> $DIR/unnecessary_symbol_str.rs:3:9
   |
LL | #![deny(clippy::internal)]
   |         ^^^^^^^^^^^^^^^^
   = note: `#[deny(clippy::unnecessary_symbol_str)]` implied by `#[deny(clippy::internal)]`

error: unnecessary `Symbol` to string conversion
  --> $DIR/unnecessary_symbol_str.rs:17:5
   |
LL |     Symbol::intern("foo").to_string() == "self";
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Symbol::intern("foo") == rustc_span::symbol::kw::SelfLower`

error: unnecessary `Symbol` to string conversion
  --> $DIR/unnecessary_symbol_str.rs:18:5
   |
LL |     Symbol::intern("foo").to_ident_string() != "Self";
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Symbol::intern("foo") != rustc_span::symbol::kw::SelfUpper`

error: unnecessary `Symbol` to string conversion
  --> $DIR/unnecessary_symbol_str.rs:19:5
   |
LL |     &*Ident::empty().as_str() == "clippy";
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Ident::empty().name == rustc_span::sym::clippy`

error: unnecessary `Symbol` to string conversion
  --> $DIR/unnecessary_symbol_str.rs:20:5
   |
LL |     "clippy" == Ident::empty().to_string();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `rustc_span::sym::clippy == Ident::empty().name`

error: aborting due to 5 previous errors