diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2023-04-11 12:18:52 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-11 12:18:52 +0900 |
| commit | 016ebf868bb12b0fab78755c6f69a36f5f0e342c (patch) | |
| tree | c2f82fc832da1150f43c929a87d83371855a6743 | |
| parent | a996418e3de657c6b0f42fe6b358c527b3e887f3 (diff) | |
| parent | 271ac7b528989c571ad85a5561f10aace5a6a674 (diff) | |
| download | rust-016ebf868bb12b0fab78755c6f69a36f5f0e342c.tar.gz rust-016ebf868bb12b0fab78755c6f69a36f5f0e342c.zip | |
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
| -rw-r--r-- | tests/ui/associated-type-bounds/issue-104916.rs | 14 | ||||
| -rw-r--r-- | tests/ui/associated-type-bounds/issue-104916.stderr | 8 |
2 files changed, 22 insertions, 0 deletions
diff --git a/tests/ui/associated-type-bounds/issue-104916.rs b/tests/ui/associated-type-bounds/issue-104916.rs new file mode 100644 index 00000000000..3361fa011ed --- /dev/null +++ b/tests/ui/associated-type-bounds/issue-104916.rs @@ -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() {} diff --git a/tests/ui/associated-type-bounds/issue-104916.stderr b/tests/ui/associated-type-bounds/issue-104916.stderr new file mode 100644 index 00000000000..35435962ffe --- /dev/null +++ b/tests/ui/associated-type-bounds/issue-104916.stderr @@ -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 + |
