fork/rust

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

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

master
1.3 KiB45 linesraw
1error[E0369]: cannot multiply `&mut Foo` by `&Foo`
2  --> $DIR/borrow-suggestion-109352.rs:21:25
3   |
4LL |     let _ = ref_mut_foo * ref_foo;
5   |             ----------- ^ ------- &Foo
6   |             |
7   |             &mut Foo
8   |
9   = note: an implementation for `&Foo * &Foo` exists
10help: consider reborrowing this side
11   |
12LL |     let _ = &*ref_mut_foo * ref_foo;
13   |             ++
14
15error[E0369]: cannot multiply `&mut Foo` by `&mut Foo`
16  --> $DIR/borrow-suggestion-109352.rs:23:25
17   |
18LL |     let _ = ref_mut_foo * ref_mut_foo;
19   |             ----------- ^ ----------- &mut Foo
20   |             |
21   |             &mut Foo
22   |
23   = note: an implementation for `&Foo * &Foo` exists
24help: consider reborrowing both sides
25   |
26LL |     let _ = &*ref_mut_foo * &*ref_mut_foo;
27   |             ++              ++
28
29error[E0369]: cannot multiply `&mut Foo` by `&Foo`
30  --> $DIR/borrow-suggestion-109352.rs:25:25
31   |
32LL |     let _ = ref_mut_foo * &owned_foo;
33   |             ----------- ^ ---------- &Foo
34   |             |
35   |             &mut Foo
36   |
37   = note: an implementation for `&Foo * &Foo` exists
38help: consider reborrowing this side
39   |
40LL |     let _ = &*ref_mut_foo * &owned_foo;
41   |             ++
42
43error: aborting due to 3 previous errors
44
45For more information about this error, try `rustc --explain E0369`.