fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0369]: cannot multiply `Bar` by `Bar` 2 --> $DIR/borrow-suggestion-109352-2.rs:19:23 3 | 4LL | let _ = owned_bar * owned_bar; 5 | --------- ^ --------- Bar 6 | | 7 | Bar 8 | 9note: an implementation of `Mul` might be missing for `Bar` 10 --> $DIR/borrow-suggestion-109352-2.rs:1:1 11 | 12LL | struct Bar; 13 | ^^^^^^^^^^ must implement `Mul` 14note: the trait `Mul` must be implemented 15 --> $SRC_DIR/core/src/ops/arith.rs:LL:COL 16 17error[E0369]: cannot multiply `&Bar` by `&Bar` 18 --> $DIR/borrow-suggestion-109352-2.rs:21:21 19 | 20LL | let _ = ref_bar * ref_bar; 21 | ------- ^ ------- &Bar 22 | | 23 | &Bar 24 | 25 = note: an implementation for `&mut Bar * &mut Bar` exists 26help: consider making this expression a mutable borrow 27 --> $DIR/borrow-suggestion-109352-2.rs:21:13 28 | 29LL | let _ = ref_bar * ref_bar; 30 | ^^^^^^^ 31help: consider making this expression a mutable borrow 32 --> $DIR/borrow-suggestion-109352-2.rs:21:23 33 | 34LL | let _ = ref_bar * ref_bar; 35 | ^^^^^^^ 36 37error[E0369]: cannot multiply `&Bar` by `&mut Bar` 38 --> $DIR/borrow-suggestion-109352-2.rs:23:21 39 | 40LL | let _ = ref_bar * ref_mut_bar; 41 | ------- ^ ----------- &mut Bar 42 | | 43 | &Bar 44 | 45 = note: an implementation for `&mut Bar * &mut Bar` exists 46help: consider making this expression a mutable borrow 47 --> $DIR/borrow-suggestion-109352-2.rs:23:13 48 | 49LL | let _ = ref_bar * ref_mut_bar; 50 | ^^^^^^^ 51 52error[E0308]: mismatched types 53 --> $DIR/borrow-suggestion-109352-2.rs:25:27 54 | 55LL | let _ = ref_mut_bar * ref_bar; 56 | ^^^^^^^ types differ in mutability 57 | 58 = note: expected mutable reference `&mut Bar` 59 found reference `&Bar` 60 61error: aborting due to 4 previous errors 62 63Some errors have detailed explanations: E0308, E0369. 64For more information about an error, try `rustc --explain E0308`.