]> git.proxmox.com Git - rustc.git/blobdiff - tests/ui/nll/user-annotations/region-error-ice-109072.rs
Merge 1.70 into proxmox/bookworm
[rustc.git] / tests / ui / nll / user-annotations / region-error-ice-109072.rs
diff --git a/tests/ui/nll/user-annotations/region-error-ice-109072.rs b/tests/ui/nll/user-annotations/region-error-ice-109072.rs
new file mode 100644 (file)
index 0000000..3f2ad3c
--- /dev/null
@@ -0,0 +1,14 @@
+// Regression test for #109072.
+// Check that we don't ICE when canonicalizing user annotation.
+
+trait Lt<'a> {
+    type T;
+}
+
+impl Lt<'missing> for () { //~ ERROR undeclared lifetime
+    type T = &'missing (); //~ ERROR undeclared lifetime
+}
+
+fn main() {
+    let _: <() as Lt<'_>>::T = &();
+}