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

12 lines
261 B
Rust

#![deny(dead_code)]
struct T1; //~ ERROR struct `T1` is never constructed
trait Foo { type Unused; } //~ ERROR trait `Foo` is never used
impl Foo for T1 { type Unused = Self; }
pub trait Bar { type Used; }
impl Bar for T1 { type Used = Self; }
fn main() {}