fn main() { let v = vec![10, 20, 30, 40]; // a slice borrows a contiguous window of the Vec let mid = &v[1..3]; println!("{:?}", mid); }
&v[a..b] is a window, not a copy