mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 19:43:43 +00:00
18 lines
377 B
Rust
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();
|
|
}
|