]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/dead-code/impl-trait.rs
Rollup merge of #106397 - compiler-errors:new-solver-impl-wc, r=lcnr
[rust.git] / tests / ui / lint / dead-code / impl-trait.rs
1 #![deny(dead_code)]
2
3 trait Trait {
4     type Type;
5 }
6
7 impl Trait for () {
8     type Type = ();
9 }
10
11 type Used = ();
12 type Unused = (); //~ ERROR type alias `Unused` is never used
13
14 fn foo() -> impl Trait<Type = Used> {}
15
16 fn main() {
17     foo();
18 }