fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0308]: mismatched types 2 --> $DIR/tutorial-suffix-inference-test.rs:9:18 3 | 4LL | identity_u16(x); 5 | ------------ ^ expected `u16`, found `u8` 6 | | 7 | arguments to this function are incorrect 8 | 9note: function defined here 10 --> $DIR/tutorial-suffix-inference-test.rs:6:8 11 | 12LL | fn identity_u16(n: u16) -> u16 { n } 13 | ^^^^^^^^^^^^ ------ 14help: you can convert a `u8` to a `u16` 15 | 16LL | identity_u16(x.into()); 17 | +++++++ 18 19error[E0308]: mismatched types 20 --> $DIR/tutorial-suffix-inference-test.rs:12:18 21 | 22LL | identity_u16(y); 23 | ------------ ^ expected `u16`, found `i32` 24 | | 25 | arguments to this function are incorrect 26 | 27note: function defined here 28 --> $DIR/tutorial-suffix-inference-test.rs:6:8 29 | 30LL | fn identity_u16(n: u16) -> u16 { n } 31 | ^^^^^^^^^^^^ ------ 32help: you can convert an `i32` to a `u16` and panic if the converted value doesn't fit 33 | 34LL | identity_u16(y.try_into().unwrap()); 35 | ++++++++++++++++++++ 36 37error[E0308]: mismatched types 38 --> $DIR/tutorial-suffix-inference-test.rs:21:18 39 | 40LL | identity_u16(a); 41 | ------------ ^ expected `u16`, found `isize` 42 | | 43 | arguments to this function are incorrect 44 | 45note: function defined here 46 --> $DIR/tutorial-suffix-inference-test.rs:6:8 47 | 48LL | fn identity_u16(n: u16) -> u16 { n } 49 | ^^^^^^^^^^^^ ------ 50help: you can convert an `isize` to a `u16` and panic if the converted value doesn't fit 51 | 52LL | identity_u16(a.try_into().unwrap()); 53 | ++++++++++++++++++++ 54 55error: aborting due to 3 previous errors 56 57For more information about this error, try `rustc --explain E0308`.