summaryrefslogtreecommitdiffstats
path: root/tests/ui/nll/user-annotations/region-error-ice-109072.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/nll/user-annotations/region-error-ice-109072.rs')
-rw-r--r--tests/ui/nll/user-annotations/region-error-ice-109072.rs14
1 files changed, 14 insertions, 0 deletions
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
index 000000000..3f2ad3ccb
--- /dev/null
+++ b/tests/ui/nll/user-annotations/region-error-ice-109072.rs
@@ -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 = &();
+}