summaryrefslogtreecommitdiffstats
path: root/tests/ui/binop/borrow-suggestion-109352.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/binop/borrow-suggestion-109352.stderr')
-rw-r--r--tests/ui/binop/borrow-suggestion-109352.stderr45
1 files changed, 45 insertions, 0 deletions
diff --git a/tests/ui/binop/borrow-suggestion-109352.stderr b/tests/ui/binop/borrow-suggestion-109352.stderr
new file mode 100644
index 000000000..71e44f54b
--- /dev/null
+++ b/tests/ui/binop/borrow-suggestion-109352.stderr
@@ -0,0 +1,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`.