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