Add regression test for #104916
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
This commit is contained in:
parent
2a198c7f62
commit
271ac7b528
14
tests/ui/associated-type-bounds/issue-104916.rs
Normal file
14
tests/ui/associated-type-bounds/issue-104916.rs
Normal 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() {}
|
8
tests/ui/associated-type-bounds/issue-104916.stderr
Normal file
8
tests/ui/associated-type-bounds/issue-104916.stderr
Normal 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
|
||||
|
Loading…
Reference in New Issue
Block a user