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:
commit
016ebf868b
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