note: MySealedTrait is a “sealed trait”, because to implement it you also need to implement sealedtrait::private::Sealed, which is not accessible; this is usually done to force you to use one of the provided types that already implement it
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
error[E0277]: the trait bound `usize: Sealed` is not satisfied --> src/main.rs:34:37 | 34 | impl sealedtrait::MySealedTrait for usize { | ^^^^^ the trait `Sealed` is not implemented for `usize` | = help: the trait `Sealed` is implemented for `i32` note: required by a bound in `MySealedTrait` --> src/main.rs:23:30 | 23 | pub trait MySealedTrait: private::Sealed { | ^^^^^^^^^^^^^^^ required by this bound in `MySealedTrait` = note: `MySealedTrait` is a "sealed trait", because to implement it you also need to implement `sealedtrait::private::Sealed`, which is not accessible; this is usually done to force you to use one of the provided types that already implement it = help: the following type implements the trait: i32