We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 10e71df commit 911cbaeCopy full SHA for 911cbae
src/test/ui/mir/mir-inlining/ice-issue-100550-unnormalized-projection.rs
@@ -0,0 +1,30 @@
1
+// This test verifies that we do not ICE due to MIR inlining in case of normalization failure
2
+// in a projection.
3
+//
4
+// compile-flags: --crate-type lib -C opt-level=3
5
+// build-pass
6
+
7
+pub trait Trait {
8
+ type Associated;
9
+}
10
+impl<T> Trait for T {
11
+ type Associated = T;
12
13
14
+pub struct Struct<T>(<T as Trait>::Associated);
15
16
+pub fn foo<T>() -> Struct<T>
17
+where
18
+ T: Trait,
19
+{
20
+ bar()
21
22
23
+#[inline]
24
+fn bar<T>() -> Struct<T> {
25
+ Struct(baz())
26
27
28
+fn baz<T>() -> T {
29
+ unimplemented!()
30
0 commit comments