Skip to content

Commit 3e8c5bc

Browse files
committed
update some compile-fail tests
Some errors, about trait objects not implementing their own trait when they aren’t object-safe, aren’t being reported. Here is the error missing from compile-fail/trait-test-2.rs: ``` error[E0277]: the trait bound `dyn bar: bar` is not satisfied --> src/test/compile-fail/trait-test-2.rs:20:26 | 20 | (box 10 as Box<bar>).dup(); | ^^^ the trait `bar` is not implemented for `dyn bar` ``` My best guess is it has to do with how object-safety checks now include trait-solving. It doesn’t look like a very useful error, so I’m not too worried.
1 parent b31b0f9 commit 3e8c5bc

File tree

2 files changed

+0
-3
lines changed

2 files changed

+0
-3
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-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
}

0 commit comments

Comments
 (0)