parent
548e14b439
commit
fc5085d570
20
tests/ui/polymorphization/ice-poly-with-mir-opts-90192.rs
Normal file
20
tests/ui/polymorphization/ice-poly-with-mir-opts-90192.rs
Normal file
@ -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>();
|
||||
}
|
Loading…
Reference in New Issue
Block a user