From 79f3fe48b04fcf4a87316a2e61b098153d959657 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sun, 24 Sep 2023 14:09:38 +0200 Subject: [PATCH] Add regression test for #102467 --- tests/rustdoc-ui/issue-102467.rs | 15 +++++++++++++++ tests/rustdoc-ui/issue-102467.stderr | 9 +++++++++ 2 files changed, 24 insertions(+) create mode 100644 tests/rustdoc-ui/issue-102467.rs create mode 100644 tests/rustdoc-ui/issue-102467.stderr diff --git a/tests/rustdoc-ui/issue-102467.rs b/tests/rustdoc-ui/issue-102467.rs new file mode 100644 index 0000000000000..bff876e41d66a --- /dev/null +++ b/tests/rustdoc-ui/issue-102467.rs @@ -0,0 +1,15 @@ +// Regression test for . +// It ensures that the expected error is displayed. + +#![feature(associated_const_equality)] + +trait T { + type A: S = 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 0000000000000..a337293f7a055 --- /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 = 34>; + | ^^^^^^^^ associated type not allowed here + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0229`.