summaryrefslogtreecommitdiffstats
path: root/tests/ui/typeck/escaping_bound_vars.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/typeck/escaping_bound_vars.rs')
-rw-r--r--tests/ui/typeck/escaping_bound_vars.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/typeck/escaping_bound_vars.rs b/tests/ui/typeck/escaping_bound_vars.rs
new file mode 100644
index 000000000..1fb063d2c
--- /dev/null
+++ b/tests/ui/typeck/escaping_bound_vars.rs
@@ -0,0 +1,16 @@
+// Test for issues/115517 which is fixed by pull/115486
+// This should not ice
+trait Test<const C: usize> {}
+
+trait Elide<T> {
+ fn call();
+}
+
+pub fn test()
+where
+ (): Test<{ 1 + (<() as Elide(&())>::call) }>,
+ //~^ ERROR cannot capture late-bound lifetime in constant
+{
+}
+
+fn main() {}