summaryrefslogtreecommitdiffstats
path: root/tests/ui/lifetimes/unusual-rib-combinations.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/lifetimes/unusual-rib-combinations.rs')
-rw-r--r--tests/ui/lifetimes/unusual-rib-combinations.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/ui/lifetimes/unusual-rib-combinations.rs b/tests/ui/lifetimes/unusual-rib-combinations.rs
index 1c122f42e..0ae68ad04 100644
--- a/tests/ui/lifetimes/unusual-rib-combinations.rs
+++ b/tests/ui/lifetimes/unusual-rib-combinations.rs
@@ -25,4 +25,9 @@ fn d<const C: S>() {}
//~^ ERROR missing lifetime specifier
//~| ERROR `S<'_>` is forbidden as the type of a const generic parameter
+trait Foo<'a> {}
+struct Bar<const N: &'a (dyn for<'a> Foo<'a>)>;
+//~^ ERROR use of non-static lifetime `'a` in const generic
+//~| ERROR `&dyn for<'a> Foo<'a>` is forbidden as the type of a const generic parameter
+
fn main() {}