Minimal reproducible example
Cargo.toml
[dependencies]
num = "0.1"
num-derive = "0.1"
main.rs
#![deny(trivial_numeric_casts)]
extern crate num;
#[macro_use]
extern crate num_derive;
#[derive(FromPrimitive)]
pub enum SomeEnum {
A = 1
}
fn main() {
}
Error:
Compiling hello_world_clion v0.1.0 (file:///C:/Users/Alex/Documents/Rust/hello_world_clion)
error: trivial numeric cast: `isize` as `isize`. Cast can be replaced by coercion, this might require type ascription or a temporary variable
--> src\main.rs:6:10
|
6 | #[derive(FromPrimitive)]
| ^^^^^^^^^^^^^
|
note: lint level defined here
--> src\main.rs:1:9
|
1 | #![deny(trivial_numeric_casts)]
| ^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error
Our project depends heavily on this deny attribute so disable it is a no-no. Currently we use num-derive = "=0.1.41" but I hope we can switch to higher version. Is seems to be an easy fix.
Minimal reproducible example
Cargo.toml
main.rs
Error:
Our project depends heavily on this
denyattribute so disable it is a no-no. Currently we usenum-derive = "=0.1.41"but I hope we can switch to higher version. Is seems to be an easy fix.