-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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``
- Loading branch information
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
error: cannot capture late-bound lifetime in constant | ||
--> $DIR/escaping_bound_vars.rs:11:35 | ||
| | ||
LL | (): Test<{ 1 + (<() as Elide(&())>::call) }>, | ||
| -^ | ||
| | | ||
| lifetime defined here | ||
|
||
error: aborting due to previous error | ||
|