mirror of
https://github.com/rust-lang/rust.git
synced 2025-12-02 14:48:04 +00:00
The previous implementation was inconsistent about transitions that apply for an init byte. For example, when answering a query, an init byte could use corresponding init transition. Init byte could also use uninit transition, but only when the corresponding init transition was absent. This behaviour was incompatible with DFA union construction. Define an uninit transition to match an uninit byte only and update implementation accordingly. To describe that `Tree::uninit` is valid for any value, build an automaton that accepts any byte value. Additionally, represent byte ranges uniformly as a pair of integers to avoid special case for uninit byte.
18 lines
829 B
Plaintext
18 lines
829 B
Plaintext
error[E0277]: `MaybeUninit<u8>` cannot be safely transmuted into `[u8; 2]`
|
|
--> $DIR/extension.rs:11:46
|
|
|
|
|
LL | is_maybe_transmutable::<MaybeUninit<u8>, [u8; 2]>();
|
|
| ^^^^^^^ the size of `MaybeUninit<u8>` is smaller than the size of `[u8; 2]`
|
|
|
|
|
note: required by a bound in `is_maybe_transmutable`
|
|
--> $DIR/extension.rs:6:16
|
|
|
|
|
LL | pub fn is_maybe_transmutable<Src, Dst>()
|
|
| --------------------- required by a bound in this function
|
|
LL | where Dst: TransmuteFrom<Src, { Assume::VALIDITY.and(Assume::SAFETY) }>
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_maybe_transmutable`
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|