summaryrefslogtreecommitdiffstats
path: root/tests/ui/type-alias-impl-trait/issue-68368-non-defining-use-2.rs
blob: 5e0a82a72868ab88337ba20251768de6c23193b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Regression test for issue #68368
// Ensures that we don't ICE when emitting an error
// for a non-defining use when lifetimes are involved

#![feature(type_alias_impl_trait)]
trait Trait<T> {}
type Alias<'a, U> = impl Trait<U>;

fn f<'a>() -> Alias<'a, ()> {}
//~^ ERROR expected generic type parameter, found `()`

fn main() {}

impl<X> Trait<X> for () {}