2021-01-15 03:56:44 -06:00
|
|
|
error: unnecessary `Symbol` to string conversion
|
2023-07-27 08:23:04 -05:00
|
|
|
--> $DIR/unnecessary_symbol_str.rs:15:5
|
2021-01-15 03:56:44 -06:00
|
|
|
|
|
|
|
|
LL | Symbol::intern("foo").as_str() == "clippy";
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Symbol::intern("foo") == rustc_span::sym::clippy`
|
|
|
|
|
|
|
|
|
note: the lint level is defined here
|
2023-07-27 08:23:04 -05:00
|
|
|
--> $DIR/unnecessary_symbol_str.rs:2:9
|
2021-01-15 03:56:44 -06:00
|
|
|
|
|
|
|
|
LL | #![deny(clippy::internal)]
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
= note: `#[deny(clippy::unnecessary_symbol_str)]` implied by `#[deny(clippy::internal)]`
|
|
|
|
|
|
|
|
error: unnecessary `Symbol` to string conversion
|
2023-07-27 08:23:04 -05:00
|
|
|
--> $DIR/unnecessary_symbol_str.rs:16:5
|
2021-01-15 03:56:44 -06:00
|
|
|
|
|
|
|
|
LL | Symbol::intern("foo").to_string() == "self";
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Symbol::intern("foo") == rustc_span::symbol::kw::SelfLower`
|
|
|
|
|
|
|
|
error: unnecessary `Symbol` to string conversion
|
2023-07-27 08:23:04 -05:00
|
|
|
--> $DIR/unnecessary_symbol_str.rs:17:5
|
2021-01-15 03:56:44 -06:00
|
|
|
|
|
|
|
|
LL | Symbol::intern("foo").to_ident_string() != "Self";
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Symbol::intern("foo") != rustc_span::symbol::kw::SelfUpper`
|
|
|
|
|
|
|
|
error: unnecessary `Symbol` to string conversion
|
2023-07-27 08:23:04 -05:00
|
|
|
--> $DIR/unnecessary_symbol_str.rs:18:5
|
2021-01-15 03:56:44 -06:00
|
|
|
|
|
2021-10-17 15:20:30 -05:00
|
|
|
LL | &*Ident::empty().as_str() == "clippy";
|
2021-10-21 05:18:12 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Ident::empty().name == rustc_span::sym::clippy`
|
2021-01-15 03:56:44 -06:00
|
|
|
|
|
|
|
error: unnecessary `Symbol` to string conversion
|
2023-07-27 08:23:04 -05:00
|
|
|
--> $DIR/unnecessary_symbol_str.rs:19:5
|
2021-01-15 03:56:44 -06:00
|
|
|
|
|
2021-10-17 15:20:30 -05:00
|
|
|
LL | "clippy" == Ident::empty().to_string();
|
2021-10-21 05:18:12 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `rustc_span::sym::clippy == Ident::empty().name`
|
2021-01-15 03:56:44 -06:00
|
|
|
|
|
|
|
error: aborting due to 5 previous errors
|
2020-12-30 15:52:15 -06:00
|
|
|
|