]> git.lizzy.rs Git - rust.git/blob - tests/ui/type-alias-impl-trait/outlives-bound-var.rs
Rollup merge of #104672 - Voultapher:unify-sort-modules, r=thomcc
[rust.git] / tests / ui / type-alias-impl-trait / outlives-bound-var.rs
1 // Here we process outlive obligations involving
2 // opaque types with bound vars in substs.
3 // This was an ICE.
4 //
5 // check-pass
6 #![feature(type_alias_impl_trait)]
7
8 type Ty<'a> = impl Sized + 'a;
9 fn define<'a>() -> Ty<'a> {}
10
11 // Ty<'^0>: 'static
12 fn test1(_: &'static fn(Ty<'_>)) {}
13
14 fn test2() {
15     None::<&fn(Ty<'_>)>;
16 }
17
18 fn main() { }