]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.stderr
Require Drop impls to have the same constness on its bounds as the bounds on the...
[rust.git] / src / test / ui / issues / issue-46756-consider-borrowing-cast-or-binexpr.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-46756-consider-borrowing-cast-or-binexpr.rs:12:42
3    |
4 LL |     light_flows_our_war_of_mocking_words(behold as usize);
5    |     ------------------------------------ ^^^^^^^^^^^^^^^
6    |     |                                    |
7    |     |                                    expected `&usize`, found `usize`
8    |     |                                    help: consider borrowing here: `&(behold as usize)`
9    |     arguments to this function are incorrect
10    |
11 note: function defined here
12   --> $DIR/issue-46756-consider-borrowing-cast-or-binexpr.rs:5:4
13    |
14 LL | fn light_flows_our_war_of_mocking_words(and_yet: &usize) -> usize {
15    |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ---------------
16
17 error[E0308]: mismatched types
18   --> $DIR/issue-46756-consider-borrowing-cast-or-binexpr.rs:14:42
19    |
20 LL |     light_flows_our_war_of_mocking_words(with_tears + 4);
21    |     ------------------------------------ ^^^^^^^^^^^^^^
22    |     |                                    |
23    |     |                                    expected `&usize`, found `usize`
24    |     |                                    help: consider borrowing here: `&(with_tears + 4)`
25    |     arguments to this function are incorrect
26    |
27 note: function defined here
28   --> $DIR/issue-46756-consider-borrowing-cast-or-binexpr.rs:5:4
29    |
30 LL | fn light_flows_our_war_of_mocking_words(and_yet: &usize) -> usize {
31    |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ---------------
32
33 error: aborting due to 2 previous errors
34
35 For more information about this error, try `rustc --explain E0308`.