]> git.lizzy.rs Git - rust.git/blob - tests/ui/mismatched_types/non_zero_assigned_something.rs
Rollup merge of #106106 - jyn514:remote-tracking-branch, r=Mark-Simulacrum
[rust.git] / tests / ui / mismatched_types / non_zero_assigned_something.rs
1 fn main() {
2     let _: std::num::NonZeroU64 = 1;
3     //~^ ERROR mismatched types
4     //~| HELP  consider calling `NonZeroU64::new`
5
6     let _: Option<std::num::NonZeroU64> = 1;
7     //~^ ERROR mismatched types
8     //~| HELP  consider calling `NonZeroU64::new`
9 }