summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lint/dead-code/impl-trait.rs
blob: 757b8f83ef0715e611bcb6711ae49179f9364a5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![deny(dead_code)]

trait Trait {
    type Type;
}

impl Trait for () {
    type Type = ();
}

type Used = ();
type Unused = (); //~ ERROR type alias `Unused` is never used

fn foo() -> impl Trait<Type = Used> {}

fn main() {
    foo();
}