mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-18 09:03:18 +00:00
12 lines
189 B
Rust
12 lines
189 B
Rust
|
#![allow(unused)]
|
||
|
#![warn(clippy::redundant_slicing)]
|
||
|
|
||
|
fn main() {
|
||
|
let x: &[u32] = &[0];
|
||
|
let err = &x[..];
|
||
|
|
||
|
let v = vec![0];
|
||
|
let ok = &v[..];
|
||
|
let err = &(&v[..])[..];
|
||
|
}
|