We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 093b9d5 commit 188d8c9Copy full SHA for 188d8c9
tests/ui/typeck/escaping_bound_vars.rs
@@ -0,0 +1,16 @@
1
+// Test for issues/115517 which is fixed by pull/115486
2
+// This should not ice
3
+trait Test<const C: usize> {}
4
+
5
+trait Elide<T> {
6
+ fn call();
7
+}
8
9
+pub fn test()
10
+where
11
+ (): Test<{ 1 + (<() as Elide(&())>::call) }>,
12
+ //~^ ERROR cannot capture late-bound lifetime in constant
13
+{
14
15
16
+fn main() {}
tests/ui/typeck/escaping_bound_vars.stderr
@@ -0,0 +1,10 @@
+error: cannot capture late-bound lifetime in constant
+ --> $DIR/escaping_bound_vars.rs:12:35
+ |
+LL | (): Test<{ 1 + (<() as Elide(&())>::call) }>,
+ | -^
+ | |
+ | lifetime defined here
+error: aborting due to previous error
0 commit comments