mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-14 17:07:17 +00:00
39 lines
1.6 KiB
Text
39 lines
1.6 KiB
Text
error: unnecessary `Symbol` to string conversion
|
|
--> $DIR/unnecessary_symbol_str.rs:11: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:12: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:13: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:14:5
|
|
|
|
|
LL | &*Ident::invalid().as_str() == "clippy";
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Ident::invalid().name == rustc_span::sym::clippy`
|
|
|
|
error: unnecessary `Symbol` to string conversion
|
|
--> $DIR/unnecessary_symbol_str.rs:15:5
|
|
|
|
|
LL | "clippy" == Ident::invalid().to_string();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `rustc_span::sym::clippy == Ident::invalid().name`
|
|
|
|
error: aborting due to 5 previous errors
|
|
|