blob: 3eeead4aa8c14fe3fa8a6c968f2a2a1fdfda9886 (
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
error: converting a Symbol to a string
--> tests/ui-internal/symbol_as_str.rs:9:5
|
LL | s.as_str() == "f32";
| ^^^^^^^^^^
|
= help: add the symbols to `clippy_utils/src/sym.rs` if needed
= note: `-D clippy::symbol-as-str` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::symbol_as_str)]`
help: use preinterned symbols instead
|
LL - s.as_str() == "f32";
LL + s == sym::f32;
|
error: converting a Symbol to a string
--> tests/ui-internal/symbol_as_str.rs:11:5
|
LL | s.as_str() == "proc-macro";
| ^^^^^^^^^^
|
= help: add the symbols to `clippy_utils/src/sym.rs` if needed
help: use preinterned symbols instead
|
LL - s.as_str() == "proc-macro";
LL + s == sym::proc_dash_macro;
|
error: converting a Symbol to a string
--> tests/ui-internal/symbol_as_str.rs:13:5
|
LL | s.as_str() == "self";
| ^^^^^^^^^^
|
= help: add the symbols to `clippy_utils/src/sym.rs` if needed
help: use preinterned symbols instead
|
LL - s.as_str() == "self";
LL + s == kw::SelfLower;
|
error: converting a Symbol to a string
--> tests/ui-internal/symbol_as_str.rs:15:5
|
LL | s.as_str() == "msrv";
| ^^^^^^^^^^
|
= help: add the symbols to `clippy_utils/src/sym.rs` if needed
help: use preinterned symbols instead
|
LL - s.as_str() == "msrv";
LL + s == sym::msrv;
|
error: converting a Symbol to a string
--> tests/ui-internal/symbol_as_str.rs:17:5
|
LL | s.as_str() == "Cargo.toml";
| ^^^^^^^^^^
|
= help: add the symbols to `clippy_utils/src/sym.rs` if needed
help: use preinterned symbols instead
|
LL - s.as_str() == "Cargo.toml";
LL + s == sym::Cargo_toml;
|
error: converting a Symbol to a string
--> tests/ui-internal/symbol_as_str.rs:19:14
|
LL | "get" == s.as_str();
| ^^^^^^^^^^
|
= help: add the symbols to `clippy_utils/src/sym.rs` if needed
help: use preinterned symbols instead
|
LL - "get" == s.as_str();
LL + sym::get == s;
|
error: converting a Symbol to a string
--> tests/ui-internal/symbol_as_str.rs:22:19
|
LL | let _ = match s.as_str() {
| ^^^^^^^^^^
|
= help: add the symbols to `clippy_utils/src/sym.rs` if needed
help: use preinterned symbols instead
|
LL ~ let _ = match s {
LL |
LL ~ sym::unwrap_err => 1,
LL ~ sym::unwrap_or_default | sym::unwrap_or_else => 2,
|
error: aborting due to 7 previous errors
|