]> git.lizzy.rs Git - rust.git/blob - src/test/ui/tutorial-suffix-inference-test.stderr
Rollup merge of #61207 - taiki-e:arbitrary_self_types-lifetime-elision-2, r=Centril
[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 help: you can convert an `i32` to `u16` and panic if the converted value wouldn't fit
16    |
17 LL |     identity_u16(y.try_into().unwrap());
18    |                  ^^^^^^^^^^^^^^^^^^^^^
19
20 error[E0308]: mismatched types
21   --> $DIR/tutorial-suffix-inference-test.rs:21:18
22    |
23 LL |     identity_u16(a);
24    |                  ^ expected u16, found isize
25 help: you can convert an `isize` to `u16` and panic if the converted value wouldn't fit
26    |
27 LL |     identity_u16(a.try_into().unwrap());
28    |                  ^^^^^^^^^^^^^^^^^^^^^
29
30 error: aborting due to 3 previous errors
31
32 For more information about this error, try `rustc --explain E0308`.