File tree Expand file tree Collapse file tree 2 files changed +29
-2
lines changed
tests/ui/privacy/sealed-traits Expand file tree Collapse file tree 2 files changed +29
-2
lines changed Original file line number Diff line number Diff line change 1- // We should not emit sealed traits note, see issue #143392
1+ // We should not emit sealed traits note, see issue #143392 and #143121
22
3+ /// Reported in #143392
34mod inner {
45 pub trait TraitA { }
56
@@ -10,4 +11,13 @@ struct Struct;
1011
1112impl inner:: TraitB for Struct { } //~ ERROR the trait bound `Struct: TraitA` is not satisfied [E0277]
1213
14+ /// Reported in #143121
15+ mod x {
16+ pub trait A { }
17+ pub trait B : A { }
18+
19+ pub struct C ;
20+ impl B for C { } //~ ERROR the trait bound `C: A` is not satisfied [E0277]
21+ }
22+
1323fn main ( ) { }
Original file line number Diff line number Diff line change @@ -15,6 +15,23 @@ note: required by a bound in `TraitB`
1515LL | pub trait TraitB: TraitA {}
1616 | ^^^^^^ required by this bound in `TraitB`
1717
18- error: aborting due to 1 previous error
18+ error[E0277]: the trait bound `C: A` is not satisfied
19+ --> $DIR/false-sealed-traits-note.rs:18:16
20+ |
21+ LL | impl B for C {}
22+ | ^ the trait `A` is not implemented for `C`
23+ |
24+ help: this trait has no implementations, consider adding one
25+ --> $DIR/false-sealed-traits-note.rs:14:5
26+ |
27+ LL | pub trait A {}
28+ | ^^^^^^^^^^^
29+ note: required by a bound in `B`
30+ --> $DIR/false-sealed-traits-note.rs:15:18
31+ |
32+ LL | pub trait B: A {}
33+ | ^ required by this bound in `B`
34+
35+ error: aborting due to 2 previous errors
1936
2037For more information about this error, try `rustc --explain E0277`.
You can’t perform that action at this time.
0 commit comments