Skip to content

Commit 27a5146

Browse files
authored
Rollup merge of #116561 - ouz-a:testfor_115517, r=compiler-errors
Add a test for fixed ICE Addresses #115517 (comment) Closes #115517 r? ``@compiler-errors``
2 parents ea5cac0 + 2e000eb commit 27a5146

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
+16
Original file line numberDiff line numberDiff line change
@@ -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() {}
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
error: cannot capture late-bound lifetime in constant
2+
--> $DIR/escaping_bound_vars.rs:11:35
3+
|
4+
LL | (): Test<{ 1 + (<() as Elide(&())>::call) }>,
5+
| -^
6+
| |
7+
| lifetime defined here
8+
9+
error: aborting due to previous error
10+

0 commit comments

Comments
 (0)