about summary refs log tree commit diff
path: root/tests/ui/consts/static-default-lifetime/static-trait-impl.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/consts/static-default-lifetime/static-trait-impl.rs')
-rw-r--r--tests/ui/consts/static-default-lifetime/static-trait-impl.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/consts/static-default-lifetime/static-trait-impl.rs b/tests/ui/consts/static-default-lifetime/static-trait-impl.rs
index b50bf01453d..1e12259e483 100644
--- a/tests/ui/consts/static-default-lifetime/static-trait-impl.rs
+++ b/tests/ui/consts/static-default-lifetime/static-trait-impl.rs
@@ -17,4 +17,17 @@ impl Bar<'static> for B {
     const STATIC: &str = "";
 }
 
+struct C;
+impl Bar<'_> for C {
+    // make  ^^ not cause
+    const STATIC: &'static str = {
+        struct B;
+        impl Bar<'static> for B {
+            const STATIC: &str = "";
+            //            ^ to emit a future incompat warning
+        }
+        ""
+    };
+}
+
 fn main() {}