Fix rustdoc UI tests

Also removed a test that was literally a duplicate of the one I kept.
This commit is contained in:
Noah Lev 2025-11-06 17:38:15 -05:00
parent 5171e42cec
commit ad69a7a449
4 changed files with 5 additions and 42 deletions

View file

@ -1,7 +1,8 @@
// Regression test for <https://github.com/rust-lang/rust/issues/102467>.
// It ensures that the expected error is displayed.
#![feature(associated_const_equality)]
#![expect(incomplete_features)]
#![feature(associated_const_equality, min_generic_const_args)]
trait T {
type A: S<C<X = 0i32> = 34>;
@ -10,6 +11,7 @@ trait T {
}
trait S {
#[type_const]
const C: i32;
}

View file

@ -1,5 +1,5 @@
error[E0229]: associated item constraints are not allowed here
--> $DIR/associated-constant-not-allowed-102467.rs:7:17
--> $DIR/associated-constant-not-allowed-102467.rs:8:17
|
LL | type A: S<C<X = 0i32> = 34>;
| ^^^^^^^^ associated item constraint not allowed here
@ -11,7 +11,7 @@ LL + type A: S<C = 34>;
|
error[E0229]: associated item constraints are not allowed here
--> $DIR/associated-constant-not-allowed-102467.rs:7:17
--> $DIR/associated-constant-not-allowed-102467.rs:8:17
|
LL | type A: S<C<X = 0i32> = 34>;
| ^^^^^^^^ associated item constraint not allowed here

View file

@ -1,11 +0,0 @@
#![feature(associated_const_equality)]
trait T {
type A: S<C<X = 0i32> = 34>;
//~^ ERROR associated item constraints are not allowed here
//~| ERROR associated item constraints are not allowed here
}
trait S {
const C: i32;
}

View file

@ -1,28 +0,0 @@
error[E0229]: associated item constraints are not allowed here
--> $DIR/invalid_associated_const.rs:4:17
|
LL | type A: S<C<X = 0i32> = 34>;
| ^^^^^^^^ associated item constraint not allowed here
|
help: consider removing this associated item binding
|
LL - type A: S<C<X = 0i32> = 34>;
LL + type A: S<C = 34>;
|
error[E0229]: associated item constraints are not allowed here
--> $DIR/invalid_associated_const.rs:4:17
|
LL | type A: S<C<X = 0i32> = 34>;
| ^^^^^^^^ associated item constraint not allowed here
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
help: consider removing this associated item binding
|
LL - type A: S<C<X = 0i32> = 34>;
LL + type A: S<C = 34>;
|
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0229`.