Skip to content

Commit

Permalink
Unrolled build for rust-lang#122886
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#122886 - matthiaskrgr:issue90192, r=fee1-dead

add test for rust-lang#90192

Fixes rust-lang#90192
  • Loading branch information
rust-timer committed Mar 24, 2024
2 parents 6e6c721 + fc5085d commit f1d75b1
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/ui/polymorphization/ice-poly-with-mir-opts-90192.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// issue: rust-lang/rust#90192
// ICE assertion failed: matches!(ty.kind(), ty :: Param(_))
//@ compile-flags:-Zpolymorphize=on -Zmir-opt-level=3
//@ build-pass

fn test<T>() {
std::mem::size_of::<T>();
}

pub fn foo<T>(_: T) -> &'static fn() {
&(test::<T> as fn())
}

fn outer<T>() {
foo(|| ());
}

fn main() {
outer::<u8>();
}

0 comments on commit f1d75b1

Please sign in to comment.