We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06519f2 commit 71691d7Copy full SHA for 71691d7
tests/ui/polymorphization/ice-poly-with-mir-opts-90192.rs
@@ -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