Skip to content

Commit f4ce464

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

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

Diff for: tests/ui/typeck/escaping_bound_vars.rs

+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() {}

Diff for: tests/ui/typeck/escaping_bound_vars.stderr

+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)