Skip to content

Commit

Permalink
Auto merge of #116120 - GuillaumeGomez:regression-102467, r=compiler-…
Browse files Browse the repository at this point in the history
…errors

Add regression test for #102467

Fixes #102467.

r? `@compiler-errors`
  • Loading branch information
bors committed Sep 24, 2023
2 parents fc61fab + 79f3fe4 commit a1c7a1c
Showing 2 changed files with 24 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/rustdoc-ui/issue-102467.rs
Original file line number Diff line number Diff line change
@@ -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 changes: 9 additions & 0 deletions tests/rustdoc-ui/issue-102467.stderr
Original file line number Diff line number Diff line change
@@ -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`.

0 comments on commit a1c7a1c

Please sign in to comment.