mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-12 16:45:37 +00:00
17 lines
274 B
Rust
17 lines
274 B
Rust
|
// run-rustfix
|
||
|
|
||
|
#![warn(clippy::deref_by_slicing)]
|
||
|
|
||
|
fn main() {
|
||
|
let mut vec = vec![0];
|
||
|
let _ = &vec[..];
|
||
|
let _ = &mut vec[..];
|
||
|
|
||
|
let ref_vec = &mut vec;
|
||
|
let _ = &ref_vec[..];
|
||
|
let _ = &mut ref_vec[..];
|
||
|
|
||
|
let s = String::new();
|
||
|
let _ = &s[..];
|
||
|
}
|