]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-13359.stderr
Require Drop impls to have the same constness on its bounds as the bounds on the...
[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    |     arguments to this function are incorrect
8    |
9 note: function defined here
10   --> $DIR/issue-13359.rs:1:4
11    |
12 LL | fn foo(_s: i16) { }
13    |    ^^^ -------
14 help: you can convert an `isize` to an `i16` and panic if the converted value doesn't fit
15    |
16 LL |     foo((1*(1 as isize)).try_into().unwrap());
17    |         +              +++++++++++++++++++++
18
19 error[E0308]: mismatched types
20   --> $DIR/issue-13359.rs:10:9
21    |
22 LL |     bar(1*(1 as usize));
23    |     --- ^^^^^^^^^^^^^^ expected `u32`, found `usize`
24    |     |
25    |     arguments to this function are incorrect
26    |
27 note: function defined here
28   --> $DIR/issue-13359.rs:3:4
29    |
30 LL | fn bar(_s: u32) { }
31    |    ^^^ -------
32 help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit
33    |
34 LL |     bar((1*(1 as usize)).try_into().unwrap());
35    |         +              +++++++++++++++++++++
36
37 error: aborting due to 2 previous errors
38
39 For more information about this error, try `rustc --explain E0308`.