Open
Description
Versions:
- Rust: 1.87.0
parity-scale-codec
: 3.7.5
This code:
use parity_scale_codec::{Encode, Decode};
#[derive(Encode, Decode)]
pub enum Test {
One,
Two
}
Produces these errors:
error: trivial numeric cast: `usize` as `usize`
--> src/lib.rs:5:5
|
5 | One,
| ^^^
|
= help: cast can be replaced by coercion; this might require a temporary variable
= note: requested on the command line with `-D trivial-numeric-casts`
error: trivial numeric cast: `usize` as `usize`
--> src/lib.rs:6:5
|
6 | Two
| ^^^
|
= help: cast can be replaced by coercion; this might require a temporary variable
error: trivial numeric cast: `usize` as `usize`
--> src/lib.rs:5:5
|
5 | One,
| ^^^
|
= help: cast can be replaced by coercion; this might require a temporary variable
error: could not compile `parity-scale-trivial-num-casts-issue` (lib) due to 4 previous errors
Full reproduction: https://github.com/0x009922/parity-scale-trivial-num-casts-issue
Metadata
Metadata
Assignees
Labels
No labels