error: struct `T1` is never constructed --> $DIR/unused-trait-with-assoc-ty.rs:3:8 | LL | struct T1; | ^^ | note: the lint level is defined here --> $DIR/unused-trait-with-assoc-ty.rs:1:9 | LL | #![deny(dead_code)] | ^^^^^^^^^ error: trait `Foo` is never used --> $DIR/unused-trait-with-assoc-ty.rs:5:7 | LL | trait Foo { type Unused; } | ^^^ error: aborting due to 2 previous errors