Open mobergmann opened 3 months ago
I believe this is not a matter of compiling with nightly, rather that you're compiling for a target with "target-pointer-width": "16"
. At least that was the reason why I got the error.
The reason is that the necessary traits are only implemented for 32 bit and 64 bit, see here https://github.com/japaric/cast.rs/blob/052288097de1846b938e854e27845a93a6f4b59d/src/lib.rs#L354-L468
You might want to implement the 16 bit equivalent. I just opted not using this crate but plain old conversions usize::from(..)
or u16::try_from(..).unwrap()
I am compiling an embedded program for the Arduino, requiring the rust nightly version. It seems, that this crate cannot convert
u8
tou16
on the nightly version.My code, basically the example from the readme with all necessary steps for the embedded code.
Compilation error:
I believe the error is appropriate in this repo. If i am wrong, please inform me.