Auto merge of #116120 - GuillaumeGomez:regression-102467, r=compiler-errors
Add regression test for #102467 Fixes #102467. r? `@compiler-errors`
This commit is contained in:
commit
a1c7a1c89f
15
tests/rustdoc-ui/issue-102467.rs
Normal file
15
tests/rustdoc-ui/issue-102467.rs
Normal file
@ -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() {}
|
9
tests/rustdoc-ui/issue-102467.stderr
Normal file
9
tests/rustdoc-ui/issue-102467.stderr
Normal file
@ -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`.
|
Loading…
x
Reference in New Issue
Block a user