rust/tests/ui/lint/dead-code/unused-trait-with-assoc-const.rs

14 lines
205 B
Rust

#![deny(dead_code)]
trait Tr { //~ ERROR trait `Tr` is never used
const I: Self;
}
struct Foo; //~ ERROR struct `Foo` is never constructed
impl Tr for Foo {
const I: Self = Foo;
}
fn main() {}