Skip to content

Commit

Permalink
bless tests
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Mar 20, 2024
1 parent d369b7b commit 5b1ceaf
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 3 deletions.
1 change: 1 addition & 0 deletions tests/rustdoc-ui/invalid_associated_const.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
trait T {
type A: S<C<X = 0i32> = 34>;
//~^ ERROR associated type bindings are not allowed here
//~| ERROR associated type bindings are not allowed here
}

trait S {
Expand Down
10 changes: 9 additions & 1 deletion tests/rustdoc-ui/invalid_associated_const.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ error[E0229]: associated type bindings are not allowed here
LL | type A: S<C<X = 0i32> = 34>;
| ^^^^^^^^ associated type not allowed here

error: aborting due to 1 previous error
error[E0229]: associated type bindings are not allowed here
--> $DIR/invalid_associated_const.rs:4:17
|
LL | type A: S<C<X = 0i32> = 34>;
| ^^^^^^^^ associated type not allowed here
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0229`.
1 change: 1 addition & 0 deletions tests/rustdoc-ui/issue-102467.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
trait T {
type A: S<C<X = 0i32> = 34>;
//~^ ERROR associated type bindings are not allowed here
//~| ERROR associated type bindings are not allowed here
}

trait S {
Expand Down
10 changes: 9 additions & 1 deletion tests/rustdoc-ui/issue-102467.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ error[E0229]: associated type bindings are not allowed here
LL | type A: S<C<X = 0i32> = 34>;
| ^^^^^^^^ associated type not allowed here

error: aborting due to 1 previous error
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
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0229`.
1 change: 1 addition & 0 deletions tests/rustdoc-ui/issues/issue-96287.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ pub trait TraitWithAssoc {

pub type Foo<V> = impl Trait<V::Assoc>;
//~^ ERROR
//~| ERROR

pub trait Trait<U> {}

Expand Down
14 changes: 13 additions & 1 deletion tests/rustdoc-ui/issues/issue-96287.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@ help: consider restricting type parameter `V`
LL | pub type Foo<V: TraitWithAssoc> = impl Trait<V::Assoc>;
| ++++++++++++++++

error: aborting due to 1 previous error
error[E0220]: associated type `Assoc` not found for `V`
--> $DIR/issue-96287.rs:7:33
|
LL | pub type Foo<V> = impl Trait<V::Assoc>;
| ^^^^^ there is an associated type `Assoc` in the trait `TraitWithAssoc`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
help: consider restricting type parameter `V`
|
LL | pub type Foo<V: TraitWithAssoc> = impl Trait<V::Assoc>;
| ++++++++++++++++

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0220`.

0 comments on commit 5b1ceaf

Please sign in to comment.