1 #![feature(tool_lints)]
5 #![allow(clippy::boxed_local, clippy::needless_pass_by_value)]
6 #![allow(clippy::blacklisted_name)]
9 ($init:expr, $x:ty) => {
10 let _: Box<$x> = Box::new($init);
15 boxit!(Vec::new(), Vec<u8>);
17 pub fn test(foo: Box<Vec<bool>>) {
18 println!("{:?}", foo.get(0))
21 pub fn test2(foo: Box<Fn(Vec<u32>)>) { // pass if #31 is fixed
25 pub fn test_local_not_linted() {
26 let _: Box<Vec<bool>>;
30 test(Box::new(Vec::new()));
31 test2(Box::new(|v| println!("{:?}", v)));
33 test_local_not_linted();