Skip to content

Commit ab8b0ad

Browse files
authored
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
2 parents 0aea6c0 + 271ac7b commit ab8b0ad

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#![feature(associated_type_bounds)]
2+
3+
trait B {
4+
type AssocType;
5+
}
6+
7+
fn f()
8+
where
9+
dyn for<'j> B<AssocType: 'j>:,
10+
//~^ ERROR: associated type bounds are only allowed in where clauses and function signatures
11+
{
12+
}
13+
14+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
error: associated type bounds are only allowed in where clauses and function signatures, not in bounds
2+
--> $DIR/issue-104916.rs:9:19
3+
|
4+
LL | dyn for<'j> B<AssocType: 'j>:,
5+
| ^^^^^^^^^^^^^
6+
7+
error: aborting due to previous error
8+

0 commit comments

Comments
 (0)