rust/tests/ui/mismatched_types/non_zero_assigned_something.rs

10 lines
259 B
Rust

fn main() {
let _: std::num::NonZero<u64> = 1;
//~^ ERROR mismatched types
//~| HELP consider calling `NonZero::new`
let _: Option<std::num::NonZero<u64>> = 1;
//~^ ERROR mismatched types
//~| HELP consider calling `NonZero::new`
}