Rollup merge of #110147 - JohnTitor:issue-104916, r=compiler-errors

Add regression test for #104916

Closes #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
This commit is contained in:
Yuki Okushi 2023-04-11 12:18:52 +09:00 committed by GitHub
commit 016ebf868b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 0 deletions

View File

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

View File

@ -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