We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 08d1386 commit e2c1bf5Copy full SHA for e2c1bf5
gcc/testsuite/rust/compile/invalid-lifetime-in-generic-arg.rs
@@ -0,0 +1,14 @@
1
+#![feature(no_core)]
2
+#![no_core]
3
+
4
+// Test for segfault when processing enum variant with reference to type
5
+// with unresolved lifetime in generic arguments.
6
+// The compiler should report an error gracefully instead of crashing.
7
8
+enum ast<'a> {
9
+ num(usize),
10
+ add(&'a ast<'result>) // { dg-error "failed to resolve type path segment" }
11
+ // { dg-error "unresolved lifetime" "" { target *-*-* } .-1 }
12
+}
13
14
+pub fn main() {}
0 commit comments