rust/src/test/ui/lint/dead-code/impl-trait.rs
Pi Lanningham e063ddb12e Move dead_code related tests to test/ui/dead-code
This helps organize the tests better.  I also renamed several of the tests to remove redundant dead-code in the path, and better match what they're testing
2019-10-26 21:42:52 -04:00

18 lines
231 B
Rust

#![deny(dead_code)]
trait Trait {
type Type;
}
impl Trait for () {
type Type = ();
}
type Used = ();
type Unused = (); //~ ERROR type alias is never used
fn foo() -> impl Trait<Type = Used> {}
fn main() {
foo();
}