24 lines
1.2 KiB
Plaintext
24 lines
1.2 KiB
Plaintext
|
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
|
||
|
|