X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=enumset%2Ftests%2Fcompile-fail%2Fvariants.stderr;fp=enumset%2Ftests%2Fcompile-fail%2Fvariants.stderr;h=0425ae533a8c6bf2d9deb2fb09a86ed190f00a4f;hb=bc23bdb5b08e556236143bc6f11f0756cb21db91;hp=259842a78bef6bd117baecbab38e096b9472a29b;hpb=311e85a78e2b3277957a1c19683a9baf8cf5ce9e;p=enumset.git diff --git a/enumset/tests/compile-fail/variants.stderr b/enumset/tests/compile-fail/variants.stderr index 259842a..0425ae5 100644 --- a/enumset/tests/compile-fail/variants.stderr +++ b/enumset/tests/compile-fail/variants.stderr @@ -1,35 +1,35 @@ error: `#[derive(EnumSetType)]` currently only supports discriminants up to 127. - --> $DIR/variants.rs:5:5 + --> tests/compile-fail/variants.rs:5:5 | 5 | Variant = 128, | ^^^^^^^^^^^^^ error: Enum set discriminants must be `u32`s. (larger discrimiants are still unsupported with reprs that allow them.) - --> $DIR/variants.rs:11:15 + --> tests/compile-fail/variants.rs:11:15 | 11 | Variant = 0x100000000, | ^^^^^^^^^^^ error: `#[derive(EnumSetType)]` currently only supports enums up to 128 variants. - --> $DIR/variants.rs:22:95 + --> tests/compile-fail/variants.rs:22:95 | 22 | _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, | ^^^^ error: Enum set discriminants must be `u32`s. - --> $DIR/variants.rs:27:5 + --> tests/compile-fail/variants.rs:27:5 | 27 | Variant = -1, | ^^^^^^^^^^^^ error: `#[derive(EnumSetType)]` can only be used on fieldless enums. - --> $DIR/variants.rs:38:5 + --> tests/compile-fail/variants.rs:38:5 | 38 | Variant(u32), | ^^^^^^^^^^^^ error: serialize_repr cannot be smaller than bitset. - --> $DIR/variants.rs:41:10 + --> tests/compile-fail/variants.rs:41:10 | 41 | #[derive(EnumSetType)] | ^^^^^^^^^^^ @@ -37,9 +37,35 @@ error: serialize_repr cannot be smaller than bitset. = note: this error originates in the derive macro `EnumSetType` (in Nightly builds, run with -Z macro-backtrace for more info) error: `#[derive(EnumSetType)]` may only be used on enums - --> $DIR/variants.rs:48:1 + --> tests/compile-fail/variants.rs:48:1 | 48 | / struct BadItemType { 49 | | 50 | | } | |_^ + +error: repr cannot be smaller than bitset. + --> tests/compile-fail/variants.rs:52:10 + | +52 | #[derive(EnumSetType)] + | ^^^^^^^^^^^ + | + = note: this error originates in the derive macro `EnumSetType` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0277]: the trait bound `OkayEnumButCantUseFromRepr: EnumSetTypeWithRepr` is not satisfied + --> tests/compile-fail/variants.rs:64:5 + | +64 | EnumSet::::from_repr(1); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `EnumSetTypeWithRepr` is not implemented for `OkayEnumButCantUseFromRepr` + | +note: required by a bound in `enumset::EnumSet::::from_repr` + --> src/lib.rs + | + | T: EnumSetTypeWithRepr, + | ^^^^^^^^^^^^^^^^^^^ required by this bound in `enumset::EnumSet::::from_repr` + +error[E0277]: the trait bound `OkayEnumButCantUseFromRepr: EnumSetTypeWithRepr` is not satisfied + --> tests/compile-fail/variants.rs:64:54 + | +64 | EnumSet::::from_repr(1); + | ^ the trait `EnumSetTypeWithRepr` is not implemented for `OkayEnumButCantUseFromRepr`