]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-13359.stderr
Rollup merge of #91804 - woppopo:const_clone, r=oli-obk
[rust.git] / src / test / ui / issues / issue-13359.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-13359.rs:6:9
3    |
4 LL |     foo(1*(1 as isize));
5    |         ^^^^^^^^^^^^^^ expected `i16`, found `isize`
6    |
7 help: you can convert an `isize` to an `i16` and panic if the converted value doesn't fit
8    |
9 LL |     foo((1*(1 as isize)).try_into().unwrap());
10    |         +              +++++++++++++++++++++
11
12 error[E0308]: mismatched types
13   --> $DIR/issue-13359.rs:10:9
14    |
15 LL |     bar(1*(1 as usize));
16    |         ^^^^^^^^^^^^^^ expected `u32`, found `usize`
17    |
18 help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit
19    |
20 LL |     bar((1*(1 as usize)).try_into().unwrap());
21    |         +              +++++++++++++++++++++
22
23 error: aborting due to 2 previous errors
24
25 For more information about this error, try `rustc --explain E0308`.