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