Skip to content

Commit f1d75b1

Browse files
authored
Unrolled build for rust-lang#122886
Rollup merge of rust-lang#122886 - matthiaskrgr:issue90192, r=fee1-dead add test for rust-lang#90192 Fixes rust-lang#90192
2 parents 6e6c721 + fc5085d commit f1d75b1

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// issue: rust-lang/rust#90192
2+
// ICE assertion failed: matches!(ty.kind(), ty :: Param(_))
3+
//@ compile-flags:-Zpolymorphize=on -Zmir-opt-level=3
4+
//@ build-pass
5+
6+
fn test<T>() {
7+
std::mem::size_of::<T>();
8+
}
9+
10+
pub fn foo<T>(_: T) -> &'static fn() {
11+
&(test::<T> as fn())
12+
}
13+
14+
fn outer<T>() {
15+
foo(|| ());
16+
}
17+
18+
fn main() {
19+
outer::<u8>();
20+
}

0 commit comments

Comments
 (0)