Skip to content

Commit a0f23f8

Browse files
committed
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.
1 parent 192900e commit a0f23f8

File tree

4 files changed

+9
-42
lines changed

4 files changed

+9
-42
lines changed

src/test/ui/traits/trait-item-privacy.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,7 @@ fn check_assoc_const() {
110110
// A, B, C are resolved as inherent items, their traits don't need to be in scope
111111
C::A; //~ ERROR associated constant `A` is private
112112
//~^ ERROR the trait `assoc_const::C` cannot be made into an object
113-
//~| ERROR the trait bound `dyn assoc_const::C: assoc_const::A` is not satisfied
114113
C::B; // ERROR the trait `assoc_const::C` cannot be made into an object
115-
//~^ ERROR the trait bound `dyn assoc_const::C: assoc_const::B` is not satisfied
116114
C::C; // OK
117115
}
118116

src/test/ui/traits/trait-item-privacy.stderr

Lines changed: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -100,30 +100,6 @@ error[E0624]: associated constant `A` is private
100100
LL | C::A; //~ ERROR associated constant `A` is private
101101
| ^^^^
102102

103-
error[E0277]: the trait bound `dyn assoc_const::C: assoc_const::A` is not satisfied
104-
--> $DIR/trait-item-privacy.rs:111:5
105-
|
106-
LL | C::A; //~ ERROR associated constant `A` is private
107-
| ^^^^ the trait `assoc_const::A` is not implemented for `dyn assoc_const::C`
108-
|
109-
note: required by `assoc_const::A::A`
110-
--> $DIR/trait-item-privacy.rs:35:9
111-
|
112-
LL | const A: u8 = 0;
113-
| ^^^^^^^^^^^^^^^^
114-
115-
error[E0277]: the trait bound `dyn assoc_const::C: assoc_const::B` is not satisfied
116-
--> $DIR/trait-item-privacy.rs:114:5
117-
|
118-
LL | C::B; // ERROR the trait `assoc_const::C` cannot be made into an object
119-
| ^^^^ the trait `assoc_const::B` is not implemented for `dyn assoc_const::C`
120-
|
121-
note: required by `assoc_const::B::B`
122-
--> $DIR/trait-item-privacy.rs:39:9
123-
|
124-
LL | const B: u8 = 0;
125-
| ^^^^^^^^^^^^^^^^
126-
127103
error[E0038]: the trait `assoc_const::C` cannot be made into an object
128104
--> $DIR/trait-item-privacy.rs:111:5
129105
|
@@ -135,36 +111,36 @@ LL | C::A; //~ ERROR associated constant `A` is private
135111
= note: the trait cannot contain associated consts like `A`
136112

137113
error[E0223]: ambiguous associated type
138-
--> $DIR/trait-item-privacy.rs:127:12
114+
--> $DIR/trait-item-privacy.rs:125:12
139115
|
140116
LL | let _: S::A; //~ ERROR ambiguous associated type
141117
| ^^^^ help: use fully-qualified syntax: `<S as Trait>::A`
142118

143119
error[E0223]: ambiguous associated type
144-
--> $DIR/trait-item-privacy.rs:128:12
120+
--> $DIR/trait-item-privacy.rs:126:12
145121
|
146122
LL | let _: S::B; //~ ERROR ambiguous associated type
147123
| ^^^^ help: use fully-qualified syntax: `<S as Trait>::B`
148124

149125
error[E0223]: ambiguous associated type
150-
--> $DIR/trait-item-privacy.rs:129:12
126+
--> $DIR/trait-item-privacy.rs:127:12
151127
|
152128
LL | let _: S::C; //~ ERROR ambiguous associated type
153129
| ^^^^ help: use fully-qualified syntax: `<S as Trait>::C`
154130

155131
error: associated type `A` is private
156-
--> $DIR/trait-item-privacy.rs:131:12
132+
--> $DIR/trait-item-privacy.rs:129:12
157133
|
158134
LL | let _: T::A; //~ ERROR associated type `A` is private
159135
| ^^^^
160136

161137
error: associated type `A` is private
162-
--> $DIR/trait-item-privacy.rs:140:9
138+
--> $DIR/trait-item-privacy.rs:138:9
163139
|
164140
LL | A = u8, //~ ERROR associated type `A` is private
165141
| ^^^^^^
166142

167-
error: aborting due to 17 previous errors
143+
error: aborting due to 15 previous errors
168144

169-
Some errors occurred: E0038, E0223, E0277, E0599, E0624.
145+
Some errors occurred: E0038, E0223, E0599, E0624.
170146
For more information about an error, try `rustc --explain E0038`.

src/test/ui/traits/trait-test-2.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,4 @@ fn main() {
2020
(box 10 as Box<bar>).dup();
2121
//~^ ERROR E0038
2222
//~| ERROR E0038
23-
//~| ERROR E0277
2423
}

src/test/ui/traits/trait-test-2.stderr

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@ error[E0107]: wrong number of type arguments: expected 1, found 2
1010
LL | 10.blah::<i32, i32>(); //~ ERROR wrong number of type arguments: expected 1, found 2
1111
| ^^^ unexpected type argument
1212

13-
error[E0277]: the trait bound `dyn bar: bar` is not satisfied
14-
--> $DIR/trait-test-2.rs:20:26
15-
|
16-
LL | (box 10 as Box<bar>).dup();
17-
| ^^^ the trait `bar` is not implemented for `dyn bar`
18-
1913
error[E0038]: the trait `bar` cannot be made into an object
2014
--> $DIR/trait-test-2.rs:20:16
2115
|
@@ -35,7 +29,7 @@ LL | (box 10 as Box<bar>).dup();
3529
= note: method `blah` has generic type parameters
3630
= note: required because of the requirements on the impl of `std::ops::CoerceUnsized<std::boxed::Box<dyn bar>>` for `std::boxed::Box<{integer}>`
3731

38-
error: aborting due to 5 previous errors
32+
error: aborting due to 4 previous errors
3933

40-
Some errors occurred: E0038, E0107, E0277.
34+
Some errors occurred: E0038, E0107.
4135
For more information about an error, try `rustc --explain E0038`.

0 commit comments

Comments
 (0)