]> git.lizzy.rs Git - rust.git/blob - tests/ui/inference/issue-71309.stderr
Rollup merge of #106849 - WaffleLapkin:unvec, r=Nilstrieb
[rust.git] / tests / ui / inference / issue-71309.stderr
1 error[E0308]: `?` operator has incompatible types
2   --> $DIR/issue-71309.rs:2:18
3    |
4 LL |     let y: u32 = x?;
5    |                  ^^ expected `u32`, found `i32`
6    |
7    = note: `?` operator cannot convert from `i32` to `u32`
8 help: you can convert an `i32` to a `u32` and panic if the converted value doesn't fit
9    |
10 LL |     let y: u32 = x?.try_into().unwrap();
11    |                    ++++++++++++++++++++
12
13 error: aborting due to previous error
14
15 For more information about this error, try `rustc --explain E0308`.