rust/tests/ui/redundant_slicing.rs
2021-01-15 16:41:13 -05:00

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[..])[..];
}