fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.5 KiB39 linesraw
1error[E0308]: mismatched types
2  --> $DIR/issue-46756-consider-borrowing-cast-or-binexpr.rs:12:42
3   |
4LL |     light_flows_our_war_of_mocking_words(behold as usize);
5   |     ------------------------------------ ^^^^^^^^^^^^^^^ expected `&usize`, found `usize`
6   |     |
7   |     arguments to this function are incorrect
8   |
9note: function defined here
10  --> $DIR/issue-46756-consider-borrowing-cast-or-binexpr.rs:5:4
11   |
12LL | fn light_flows_our_war_of_mocking_words(and_yet: &usize) -> usize {
13   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ---------------
14help: consider borrowing here
15   |
16LL |     light_flows_our_war_of_mocking_words(&(behold as usize));
17   |                                          ++               +
18
19error[E0308]: mismatched types
20  --> $DIR/issue-46756-consider-borrowing-cast-or-binexpr.rs:14:42
21   |
22LL |     light_flows_our_war_of_mocking_words(with_tears + 4);
23   |     ------------------------------------ ^^^^^^^^^^^^^^ expected `&usize`, found `usize`
24   |     |
25   |     arguments to this function are incorrect
26   |
27note: function defined here
28  --> $DIR/issue-46756-consider-borrowing-cast-or-binexpr.rs:5:4
29   |
30LL | fn light_flows_our_war_of_mocking_words(and_yet: &usize) -> usize {
31   |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ---------------
32help: consider borrowing here
33   |
34LL |     light_flows_our_war_of_mocking_words(&(with_tears + 4));
35   |                                          ++              +
36
37error: aborting due to 2 previous errors
38
39For more information about this error, try `rustc --explain E0308`.