2019-03-12 07:35:20 -05:00
|
|
|
#![deny(dead_code)]
|
|
|
|
|
|
|
|
trait Trait {
|
|
|
|
type Type;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Trait for () {
|
|
|
|
type Type = ();
|
|
|
|
}
|
|
|
|
|
|
|
|
type Used = ();
|
2022-06-09 22:14:24 -05:00
|
|
|
type Unused = (); //~ ERROR type alias `Unused` is never used
|
2019-03-12 07:35:20 -05:00
|
|
|
|
|
|
|
fn foo() -> impl Trait<Type = Used> {}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
foo();
|
|
|
|
}
|