-
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.
Do not introduce bindings for types and consts in HRTB.
- Loading branch information
Showing
3 changed files
with
27 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
fn a() where for<T> T: Copy {} | ||
//~^ ERROR only lifetime parameters can be used in this context | ||
|
||
fn b() where for<const C: usize> [(); C]: Copy {} | ||
//~^ ERROR only lifetime parameters can be used in this context | ||
|
||
fn main() {} |
14 changes: 14 additions & 0 deletions
14
src/test/ui/higher-rank-trait-bounds/hrtb-wrong-kind.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,14 @@ | ||
error: only lifetime parameters can be used in this context | ||
--> $DIR/hrtb-wrong-kind.rs:1:18 | ||
| | ||
LL | fn a() where for<T> T: Copy {} | ||
| ^ | ||
|
||
error: only lifetime parameters can be used in this context | ||
--> $DIR/hrtb-wrong-kind.rs:4:24 | ||
| | ||
LL | fn b() where for<const C: usize> [(); C]: Copy {} | ||
| ^ | ||
|
||
error: aborting due to 2 previous errors | ||
|