fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0308]: mismatched types 2 --> $DIR/issue-13359.rs:6:9 3 | 4LL | foo(1*(1 as isize)); 5 | --- ^^^^^^^^^^^^^^ expected `i16`, found `isize` 6 | | 7 | arguments to this function are incorrect 8 | 9note: function defined here 10 --> $DIR/issue-13359.rs:1:4 11 | 12LL | fn foo(_s: i16) { } 13 | ^^^ ------- 14help: you can convert an `isize` to an `i16` and panic if the converted value doesn't fit 15 | 16LL | foo((1*(1 as isize)).try_into().unwrap()); 17 | + +++++++++++++++++++++ 18 19error[E0308]: mismatched types 20 --> $DIR/issue-13359.rs:10:9 21 | 22LL | bar(1*(1 as usize)); 23 | --- ^^^^^^^^^^^^^^ expected `u32`, found `usize` 24 | | 25 | arguments to this function are incorrect 26 | 27note: function defined here 28 --> $DIR/issue-13359.rs:3:4 29 | 30LL | fn bar(_s: u32) { } 31 | ^^^ ------- 32help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit 33 | 34LL | bar((1*(1 as usize)).try_into().unwrap()); 35 | + +++++++++++++++++++++ 36 37error: aborting due to 2 previous errors 38 39For more information about this error, try `rustc --explain E0308`.