rust/tests/compile-fail/needless_features.rs
2015-10-15 21:33:47 +02:00

18 lines
377 B
Rust

#![feature(plugin)]
#![feature(convert)]
#![plugin(clippy)]
#![deny(clippy)]
fn test_as_slice() {
let v = vec![1];
v.as_slice(); //~ERROR used as_slice() from the 'convert' nightly feature. Use &[..]
let mut v2 = vec![1];
v2.as_mut_slice(); //~ERROR used as_mut_slice() from the 'convert' nightly feature. Use &mut [..]
}
fn main() {
test_as_slice();
}