Add regression test for #104916

Signed-off-by: Yuki Okushi <jtitor@2k36.org>
This commit is contained in:
Yuki Okushi 2023-04-11 00:01:53 +09:00
parent 2a198c7f62
commit 271ac7b528
No known key found for this signature in database
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