fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: slicing when dereferencing would work 2 --> $DIR/deref_by_slicing.rs:8:13 3 | 4LL | let _ = &vec[..]; 5 | ^^^^^^^^ help: dereference the original value instead: `&*vec` 6 | 7 = note: `-D clippy::deref-by-slicing` implied by `-D warnings` 8 = help: to override `-D warnings` add `#[allow(clippy::deref_by_slicing)]` 9 10error: slicing when dereferencing would work 11 --> $DIR/deref_by_slicing.rs:9:13 12 | 13LL | let _ = &mut vec[..]; 14 | ^^^^^^^^^^^^ help: dereference the original value instead: `&mut *vec` 15 16error: slicing when dereferencing would work 17 --> $DIR/deref_by_slicing.rs:12:13 18 | 19LL | let _ = &ref_vec[..]; 20 | ^^^^^^^^^^^^ help: dereference the original value instead: `&**ref_vec` 21 22error: slicing when dereferencing would work 23 --> $DIR/deref_by_slicing.rs:13:21 24 | 25LL | let mut_slice = &mut ref_vec[..]; 26 | ^^^^^^^^^^^^^^^^ help: dereference the original value instead: `&mut **ref_vec` 27 28error: slicing when dereferencing would work 29 --> $DIR/deref_by_slicing.rs:14:13 30 | 31LL | let _ = &mut mut_slice[..]; // Err, re-borrows slice 32 | ^^^^^^^^^^^^^^^^^^ help: reborrow the original value instead: `&mut *mut_slice` 33 34error: slicing when dereferencing would work 35 --> $DIR/deref_by_slicing.rs:17:13 36 | 37LL | let _ = &s[..]; 38 | ^^^^^^ help: dereference the original value instead: `&*s` 39 40error: slicing when dereferencing would work 41 --> $DIR/deref_by_slicing.rs:20:18 42 | 43LL | let _ = &mut &S[..]; // Err, re-borrows slice 44 | ^^^^^^ help: reborrow the original value instead: `&*S` 45 46error: slicing when dereferencing would work 47 --> $DIR/deref_by_slicing.rs:24:13 48 | 49LL | let _ = &slice_ref[..]; // Err, derefs slice 50 | ^^^^^^^^^^^^^^ help: dereference the original value instead: `*slice_ref` 51 52error: slicing when dereferencing would work 53 --> $DIR/deref_by_slicing.rs:27:13 54 | 55LL | let _ = (&bytes[..]).read_to_end(&mut vec![]).unwrap(); // Err, re-borrows slice 56 | ^^^^^^^^^^^^ help: reborrow the original value instead: `(&*bytes)` 57 58error: aborting due to 9 previous errors 59