mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-26 14:40:32 +00:00
23 lines
1.2 KiB
Text
23 lines
1.2 KiB
Text
error: comparing `Symbol` via `Symbol::intern`
|
|
--> tests/ui-internal/slow_symbol_comparisons.rs:14:27
|
|
|
|
|
LL | let slow_comparison = symbol == Symbol::intern("example");
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Symbol::as_str` and check the string instead: `symbol.as_str() == "example"`
|
|
|
|
|
= note: `-D clippy::slow-symbol-comparisons` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::slow_symbol_comparisons)]`
|
|
|
|
error: comparing `Symbol` via `Symbol::intern`
|
|
--> tests/ui-internal/slow_symbol_comparisons.rs:16:33
|
|
|
|
|
LL | let slow_comparison_macro = symbol == sym!(example);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: use `Symbol::as_str` and check the string instead: `symbol.as_str() == "example"`
|
|
|
|
error: comparing `Symbol` via `Symbol::intern`
|
|
--> tests/ui-internal/slow_symbol_comparisons.rs:18:37
|
|
|
|
|
LL | let slow_comparison_backwards = sym!(example) == symbol;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: use `Symbol::as_str` and check the string instead: `symbol.as_str() == "example"`
|
|
|
|
error: aborting due to 3 previous errors
|
|
|