| 1 |
error[E0599]: the function or associated item `from_repr` exists for struct `EnumSet<OkayEnumButCantUseFromRepr>`, but its trait bounds were not satisfied |
| 2 |
--> tests/compile-fail/explicit_repr.rs:15:44 |
| 3 |
| |
| 4 |
4 | enum OkayEnumButCantUseFromRepr { |
| 5 |
| ------------------------------- |
| 6 |
| | |
| 7 |
| doesn't satisfy `<_ as EnumSetTypePrivate>::Repr = <OkayEnumButCantUseFromRepr as EnumSetTypeWithRepr>::Repr` |
| 8 |
| doesn't satisfy `OkayEnumButCantUseFromRepr: EnumSetTypeWithRepr` |
| 9 |
... |
| 10 |
15 | EnumSet::<OkayEnumButCantUseFromRepr>::from_repr(1); |
| 11 |
| ^^^^^^^^^ function or associated item cannot be called on `EnumSet<OkayEnumButCantUseFromRepr>` due to unsatisfied trait bounds |
| 12 |
| |
| 13 |
= note: the following trait bounds were not satisfied: |
| 14 |
`OkayEnumButCantUseFromRepr: EnumSetTypeWithRepr` |
| 15 |
`<OkayEnumButCantUseFromRepr as EnumSetTypePrivate>::Repr = <OkayEnumButCantUseFromRepr as EnumSetTypeWithRepr>::Repr` |
| 16 |
which is required by `OkayEnumButCantUseFromRepr: EnumSetTypeWithRepr` |
| 17 |
note: the trait `EnumSetTypeWithRepr` must be implemented |
| 18 |
--> src/traits.rs |
| 19 |
| |
| 20 |
| / pub unsafe trait EnumSetTypeWithRepr: |
| 21 |
| | EnumSetType + EnumSetTypePrivate<Repr = <Self as EnumSetTypeWithRepr>::Repr> |
| 22 |
| |________________________________________________________________________________^ |
| 23 |
|
| 24 |
error[E0599]: the function or associated item `from_repr` exists for struct `EnumSet<OkayEnumButCantUseFromReprArray>`, but its trait bounds were not satisfied |
| 25 |
--> tests/compile-fail/explicit_repr.rs:16:49 |
| 26 |
| |
| 27 |
10 | enum OkayEnumButCantUseFromReprArray { |
| 28 |
| ------------------------------------ |
| 29 |
| | |
| 30 |
| doesn't satisfy `<_ as EnumSetTypePrivate>::Repr = <OkayEnumButCantUseFromReprArray as EnumSetTypeWithRepr>::Repr` |
| 31 |
| doesn't satisfy `_: EnumSetTypeWithRepr` |
| 32 |
... |
| 33 |
16 | EnumSet::<OkayEnumButCantUseFromReprArray>::from_repr([1]); |
| 34 |
| ^^^^^^^^^ function or associated item cannot be called on `EnumSet<OkayEnumButCantUseFromReprArray>` due to unsatisfied trait bounds |
| 35 |
| |
| 36 |
= note: the following trait bounds were not satisfied: |
| 37 |
`OkayEnumButCantUseFromReprArray: EnumSetTypeWithRepr` |
| 38 |
`<OkayEnumButCantUseFromReprArray as EnumSetTypePrivate>::Repr = <OkayEnumButCantUseFromReprArray as EnumSetTypeWithRepr>::Repr` |
| 39 |
which is required by `OkayEnumButCantUseFromReprArray: EnumSetTypeWithRepr` |
| 40 |
note: the trait `EnumSetTypeWithRepr` must be implemented |
| 41 |
--> src/traits.rs |
| 42 |
| |
| 43 |
| / pub unsafe trait EnumSetTypeWithRepr: |
| 44 |
| | EnumSetType + EnumSetTypePrivate<Repr = <Self as EnumSetTypeWithRepr>::Repr> |
| 45 |
| |________________________________________________________________________________^ |