diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-09-24 14:09:38 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-09-24 14:09:38 +0200 |
| commit | 79f3fe48b04fcf4a87316a2e61b098153d959657 (patch) | |
| tree | a8b80e5217601d14a7f121e129e257dff9fc4353 | |
| parent | 2d25a25e5dc5636778d1e4e86bf6fa2d9a1be0af (diff) | |
| download | rust-79f3fe48b04fcf4a87316a2e61b098153d959657.tar.gz rust-79f3fe48b04fcf4a87316a2e61b098153d959657.zip | |
Add regression test for #102467
| -rw-r--r-- | tests/rustdoc-ui/issue-102467.rs | 15 | ||||
| -rw-r--r-- | tests/rustdoc-ui/issue-102467.stderr | 9 |
2 files changed, 24 insertions, 0 deletions
diff --git a/tests/rustdoc-ui/issue-102467.rs b/tests/rustdoc-ui/issue-102467.rs new file mode 100644 index 00000000000..bff876e41d6 --- /dev/null +++ b/tests/rustdoc-ui/issue-102467.rs @@ -0,0 +1,15 @@ +// Regression test for <https://github.com/rust-lang/rust/issues/102467>. +// It ensures that the expected error is displayed. + +#![feature(associated_const_equality)] + +trait T { + type A: S<C<X = 0i32> = 34>; + //~^ ERROR associated type bindings are not allowed here +} + +trait S { + const C: i32; +} + +fn main() {} diff --git a/tests/rustdoc-ui/issue-102467.stderr b/tests/rustdoc-ui/issue-102467.stderr new file mode 100644 index 00000000000..a337293f7a0 --- /dev/null +++ b/tests/rustdoc-ui/issue-102467.stderr @@ -0,0 +1,9 @@ +error[E0229]: associated type bindings are not allowed here + --> $DIR/issue-102467.rs:7:17 + | +LL | type A: S<C<X = 0i32> = 34>; + | ^^^^^^^^ associated type not allowed here + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0229`. |
