]> git.lizzy.rs Git - enumset.git/blob - enumset/tests/compile-fail/variants.stderr
Update tests for latest nightly.
[enumset.git] / enumset / tests / compile-fail / variants.stderr
1 error: `#[derive(EnumSetType)]` currently only supports discriminants up to 127.
2  --> tests/compile-fail/variants.rs:5:5
3   |
4 5 |     Variant = 128,
5   |     ^^^^^^^^^^^^^
6
7 error: Enum set discriminants must be `u32`s. (larger discrimiants are still unsupported with reprs that allow them.)
8   --> tests/compile-fail/variants.rs:11:15
9    |
10 11 |     Variant = 0x100000000,
11    |               ^^^^^^^^^^^
12
13 error: `#[derive(EnumSetType)]` currently only supports enums up to 128 variants.
14   --> tests/compile-fail/variants.rs:22:95
15    |
16 22 |     _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128,
17    |                                                                                               ^^^^
18
19 error: Enum set discriminants must be `u32`s.
20   --> tests/compile-fail/variants.rs:27:5
21    |
22 27 |     Variant = -1,
23    |     ^^^^^^^^^^^^
24
25 error: `#[derive(EnumSetType)]` can only be used on fieldless enums.
26   --> tests/compile-fail/variants.rs:38:5
27    |
28 38 |     Variant(u32),
29    |     ^^^^^^^^^^^^
30
31 error: serialize_repr cannot be smaller than bitset.
32   --> tests/compile-fail/variants.rs:41:10
33    |
34 41 | #[derive(EnumSetType)]
35    |          ^^^^^^^^^^^
36    |
37    = note: this error originates in the derive macro `EnumSetType` (in Nightly builds, run with -Z macro-backtrace for more info)
38
39 error: `#[derive(EnumSetType)]` may only be used on enums
40   --> tests/compile-fail/variants.rs:48:1
41    |
42 48 | / struct BadItemType {
43 49 | |
44 50 | | }
45    | |_^
46
47 error: repr cannot be smaller than bitset.
48   --> tests/compile-fail/variants.rs:52:10
49    |
50 52 | #[derive(EnumSetType)]
51    |          ^^^^^^^^^^^
52    |
53    = note: this error originates in the derive macro `EnumSetType` (in Nightly builds, run with -Z macro-backtrace for more info)
54
55 error[E0277]: the trait bound `OkayEnumButCantUseFromRepr: EnumSetTypeWithRepr` is not satisfied
56    --> tests/compile-fail/variants.rs:64:5
57     |
58 64  |     EnumSet::<OkayEnumButCantUseFromRepr>::from_repr(1);
59     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `EnumSetTypeWithRepr` is not implemented for `OkayEnumButCantUseFromRepr`
60     |
61 note: required by a bound in `enumset::EnumSet::<T>::from_repr`
62    --> src/lib.rs
63     |
64     |     where T: EnumSetTypeWithRepr {
65     |              ^^^^^^^^^^^^^^^^^^^ required by this bound in `enumset::EnumSet::<T>::from_repr`
66
67 error[E0277]: the trait bound `OkayEnumButCantUseFromRepr: EnumSetTypeWithRepr` is not satisfied
68   --> tests/compile-fail/variants.rs:64:5
69    |
70 64 |     EnumSet::<OkayEnumButCantUseFromRepr>::from_repr(1);
71    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `EnumSetTypeWithRepr` is not implemented for `OkayEnumButCantUseFromRepr`
72
73 error[E0277]: the trait bound `OkayEnumButCantUseFromRepr: EnumSetTypeWithRepr` is not satisfied
74   --> tests/compile-fail/variants.rs:64:54
75    |
76 64 |     EnumSet::<OkayEnumButCantUseFromRepr>::from_repr(1);
77    |                                                      ^ the trait `EnumSetTypeWithRepr` is not implemented for `OkayEnumButCantUseFromRepr`