mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-03 10:47:16 +00:00
21 lines
264 B
Rust
21 lines
264 B
Rust
//@ check-pass
|
|
#![warn(dead_code)]
|
|
|
|
enum E {
|
|
F(),
|
|
C(),
|
|
}
|
|
|
|
impl E {
|
|
#[expect(non_snake_case)]
|
|
fn F() {}
|
|
//~^ WARN: associated items `F` and `C` are never used
|
|
|
|
const C: () = ();
|
|
}
|
|
|
|
fn main() {
|
|
let _: E = E::F();
|
|
let _: E = E::C();
|
|
}
|