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.
Rollup merge of rust-lang#110147 - JohnTitor:issue-104916, r=compiler…
…-errors Add regression test for rust-lang#104916 Closes rust-lang#104916 I haven't tested if it still passes with debug assertions enabled so it'd be better to wait for CI to be green. r? compiler-errors
- Loading branch information
Showing
2 changed files
with
22 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,14 @@ | ||
#![feature(associated_type_bounds)] | ||
|
||
trait B { | ||
type AssocType; | ||
} | ||
|
||
fn f() | ||
where | ||
dyn for<'j> B<AssocType: 'j>:, | ||
//~^ ERROR: associated type bounds are only allowed in where clauses and function signatures | ||
{ | ||
} | ||
|
||
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,8 @@ | ||
error: associated type bounds are only allowed in where clauses and function signatures, not in bounds | ||
--> $DIR/issue-104916.rs:9:19 | ||
| | ||
LL | dyn for<'j> B<AssocType: 'j>:, | ||
| ^^^^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|