]> git.lizzy.rs Git - rust.git/blob - src/test/ui/tutorial-suffix-inference-test.stderr
Auto merge of #74017 - poliorcetics:where-keyword, r=jyn514
[rust.git] / src / test / ui / tutorial-suffix-inference-test.stderr
1 error[E0308]: mismatched types
2   --> $DIR/tutorial-suffix-inference-test.rs:9:18
3    |
4 LL |     identity_u16(x);
5    |                  ^
6    |                  |
7    |                  expected `u16`, found `u8`
8    |                  help: you can convert an `u8` to `u16`: `x.into()`
9
10 error[E0308]: mismatched types
11   --> $DIR/tutorial-suffix-inference-test.rs:12:18
12    |
13 LL |     identity_u16(y);
14    |                  ^ expected `u16`, found `i32`
15    |
16 help: you can convert an `i32` to `u16` and panic if the converted value wouldn't fit
17    |
18 LL |     identity_u16(y.try_into().unwrap());
19    |                  ^^^^^^^^^^^^^^^^^^^^^
20
21 error[E0308]: mismatched types
22   --> $DIR/tutorial-suffix-inference-test.rs:21:18
23    |
24 LL |     identity_u16(a);
25    |                  ^ expected `u16`, found `isize`
26    |
27 help: you can convert an `isize` to `u16` and panic if the converted value wouldn't fit
28    |
29 LL |     identity_u16(a.try_into().unwrap());
30    |                  ^^^^^^^^^^^^^^^^^^^^^
31
32 error: aborting due to 3 previous errors
33
34 For more information about this error, try `rustc --explain E0308`.