Skip to content

Commit

Permalink
add test for ICE fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aliemjay committed Jan 19, 2023
1 parent a7a8420 commit e40567b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/ui/type-alias-impl-trait/outlives-bound-var.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Here we process outlive obligations involving
// opaque types with bound vars in substs.
// This was an ICE.
//
// check-pass
#![feature(type_alias_impl_trait)]

type Ty<'a> = impl Sized + 'a;
fn define<'a>() -> Ty<'a> {}

// Ty<'^0>: 'static
fn test1(_: &'static fn(Ty<'_>)) {}

fn test2() {
None::<&fn(Ty<'_>)>;
}

fn main() { }

0 comments on commit e40567b

Please sign in to comment.