rust/tests/compile-fail/borrow_box.rs
2017-06-11 12:19:11 -04:00

14 lines
259 B
Rust

#![feature(plugin)]
#![plugin(clippy)]
#![deny(clippy)]
#![allow(boxed_local)]
#![allow(blacklisted_name)]
pub fn test(foo: &Box<bool>) { //~ ERROR you seem to be trying to use `&Box<T>`
println!("{:?}", foo)
}
fn main(){
test(&Box::new(false));
}