blob: e3c1a4c81a4918c4a5b9c234947648f3632808e5 (
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
|
warning: associated items `F` and `C` are never used
--> $DIR/dead-code-associated-function.rs:11:8
|
LL | impl E {
| ------ associated items in this implementation
LL | #[expect(non_snake_case)]
LL | fn F() {}
| ^
...
LL | const C: () = ();
| ^
|
note: it is impossible to refer to the associated function `F` because it is shadowed by this enum variant with the same name
--> $DIR/dead-code-associated-function.rs:5:5
|
LL | F(),
| ^
note: it is impossible to refer to the associated constant `C` because it is shadowed by this enum variant with the same name
--> $DIR/dead-code-associated-function.rs:6:5
|
LL | C(),
| ^
note: the lint level is defined here
--> $DIR/dead-code-associated-function.rs:2:9
|
LL | #![warn(dead_code)]
| ^^^^^^^^^
warning: 1 warning emitted
|