1
Fork 0

update tests that have changed output

I’m not sure why these tests have different output now, but they do.
In all cases, the error message that is missing looks like this: “the
trait bound `dyn Trait: Trait` is not satisfied”

My guess is that the error message is going away because object-safety
now involves trait solving, and these extra error messages are no
longer leaking out.
This commit is contained in:
Michael Hewson 2018-09-20 03:21:29 -04:00
parent 192900e7c2
commit a0f23f8405
4 changed files with 9 additions and 42 deletions

View file

@ -110,9 +110,7 @@ fn check_assoc_const() {
// A, B, C are resolved as inherent items, their traits don't need to be in scope
C::A; //~ ERROR associated constant `A` is private
//~^ ERROR the trait `assoc_const::C` cannot be made into an object
//~| ERROR the trait bound `dyn assoc_const::C: assoc_const::A` is not satisfied
C::B; // ERROR the trait `assoc_const::C` cannot be made into an object
//~^ ERROR the trait bound `dyn assoc_const::C: assoc_const::B` is not satisfied
C::C; // OK
}

View file

@ -100,30 +100,6 @@ error[E0624]: associated constant `A` is private
LL | C::A; //~ ERROR associated constant `A` is private
| ^^^^
error[E0277]: the trait bound `dyn assoc_const::C: assoc_const::A` is not satisfied
--> $DIR/trait-item-privacy.rs:111:5
|
LL | C::A; //~ ERROR associated constant `A` is private
| ^^^^ the trait `assoc_const::A` is not implemented for `dyn assoc_const::C`
|
note: required by `assoc_const::A::A`
--> $DIR/trait-item-privacy.rs:35:9
|
LL | const A: u8 = 0;
| ^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `dyn assoc_const::C: assoc_const::B` is not satisfied
--> $DIR/trait-item-privacy.rs:114:5
|
LL | C::B; // ERROR the trait `assoc_const::C` cannot be made into an object
| ^^^^ the trait `assoc_const::B` is not implemented for `dyn assoc_const::C`
|
note: required by `assoc_const::B::B`
--> $DIR/trait-item-privacy.rs:39:9
|
LL | const B: u8 = 0;
| ^^^^^^^^^^^^^^^^
error[E0038]: the trait `assoc_const::C` cannot be made into an object
--> $DIR/trait-item-privacy.rs:111:5
|
@ -135,36 +111,36 @@ LL | C::A; //~ ERROR associated constant `A` is private
= note: the trait cannot contain associated consts like `A`
error[E0223]: ambiguous associated type
--> $DIR/trait-item-privacy.rs:127:12
--> $DIR/trait-item-privacy.rs:125:12
|
LL | let _: S::A; //~ ERROR ambiguous associated type
| ^^^^ help: use fully-qualified syntax: `<S as Trait>::A`
error[E0223]: ambiguous associated type
--> $DIR/trait-item-privacy.rs:128:12
--> $DIR/trait-item-privacy.rs:126:12
|
LL | let _: S::B; //~ ERROR ambiguous associated type
| ^^^^ help: use fully-qualified syntax: `<S as Trait>::B`
error[E0223]: ambiguous associated type
--> $DIR/trait-item-privacy.rs:129:12
--> $DIR/trait-item-privacy.rs:127:12
|
LL | let _: S::C; //~ ERROR ambiguous associated type
| ^^^^ help: use fully-qualified syntax: `<S as Trait>::C`
error: associated type `A` is private
--> $DIR/trait-item-privacy.rs:131:12
--> $DIR/trait-item-privacy.rs:129:12
|
LL | let _: T::A; //~ ERROR associated type `A` is private
| ^^^^
error: associated type `A` is private
--> $DIR/trait-item-privacy.rs:140:9
--> $DIR/trait-item-privacy.rs:138:9
|
LL | A = u8, //~ ERROR associated type `A` is private
| ^^^^^^
error: aborting due to 17 previous errors
error: aborting due to 15 previous errors
Some errors occurred: E0038, E0223, E0277, E0599, E0624.
Some errors occurred: E0038, E0223, E0599, E0624.
For more information about an error, try `rustc --explain E0038`.

View file

@ -20,5 +20,4 @@ fn main() {
(box 10 as Box<bar>).dup();
//~^ ERROR E0038
//~| ERROR E0038
//~| ERROR E0277
}

View file

@ -10,12 +10,6 @@ error[E0107]: wrong number of type arguments: expected 1, found 2
LL | 10.blah::<i32, i32>(); //~ ERROR wrong number of type arguments: expected 1, found 2
| ^^^ unexpected type argument
error[E0277]: the trait bound `dyn bar: bar` is not satisfied
--> $DIR/trait-test-2.rs:20:26
|
LL | (box 10 as Box<bar>).dup();
| ^^^ the trait `bar` is not implemented for `dyn bar`
error[E0038]: the trait `bar` cannot be made into an object
--> $DIR/trait-test-2.rs:20:16
|
@ -35,7 +29,7 @@ LL | (box 10 as Box<bar>).dup();
= note: method `blah` has generic type parameters
= note: required because of the requirements on the impl of `std::ops::CoerceUnsized<std::boxed::Box<dyn bar>>` for `std::boxed::Box<{integer}>`
error: aborting due to 5 previous errors
error: aborting due to 4 previous errors
Some errors occurred: E0038, E0107, E0277.
Some errors occurred: E0038, E0107.
For more information about an error, try `rustc --explain E0038`.