forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
52aff53
commit f479a7a
Showing
7 changed files
with
50 additions
and
12 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
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
13 changes: 13 additions & 0 deletions
13
tests/ui/const-generics/late-bound-vars/late-bound-in-return-issue-77357.rs
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,13 @@ | ||
// known-bug: unknown | ||
// see comment on `tests/ui/const-generics/late-bound-vars/simple.rs` | ||
|
||
#![feature(generic_const_exprs)] | ||
#![allow(incomplete_features)] | ||
|
||
trait MyTrait<T> {} | ||
|
||
fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> { | ||
todo!() | ||
} | ||
|
||
fn main() {} |
8 changes: 8 additions & 0 deletions
8
tests/ui/const-generics/late-bound-vars/late-bound-in-return-issue-77357.stderr
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,8 @@ | ||
error: cannot capture late-bound lifetime in constant | ||
--> $DIR/late-bound-in-return-issue-77357.rs:9:53 | ||
| | ||
LL | fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> { | ||
| -- lifetime defined here ^^ | ||
|
||
error: aborting due to previous error | ||
|
15 changes: 15 additions & 0 deletions
15
tests/ui/const-generics/late-bound-vars/late-bound-in-where-issue-83993.rs
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,15 @@ | ||
// known-bug: unknown | ||
// see comment on `tests/ui/const-generics/late-bound-vars/simple.rs` | ||
|
||
#![feature(generic_const_exprs)] | ||
#![allow(incomplete_features)] | ||
|
||
fn bug<'a>() | ||
where | ||
for<'b> [(); { | ||
let x: &'b (); | ||
0 | ||
}]: | ||
{} | ||
|
||
fn main() {} |
10 changes: 10 additions & 0 deletions
10
tests/ui/const-generics/late-bound-vars/late-bound-in-where-issue-83993.stderr
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/late-bound-in-where-issue-83993.rs:10:17 | ||
| | ||
LL | for<'b> [(); { | ||
| -- lifetime defined here | ||
LL | let x: &'b (); | ||
| ^^ | ||
|
||
error: aborting due to previous error | ||
|
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