diff --git a/clippy_tests/examples/box_vec.rs b/clippy_tests/examples/box_vec.rs index 507d9e77da0..f8c5a80c59d 100644 --- a/clippy_tests/examples/box_vec.rs +++ b/clippy_tests/examples/box_vec.rs @@ -22,8 +22,13 @@ pub fn test2(foo: Box)>) { // pass if #31 is fixed foo(vec![1, 2, 3]) } +pub fn test_local_not_linted() { + let _: Box>; +} + fn main(){ test(Box::new(Vec::new())); test2(Box::new(|v| println!("{:?}", v))); test_macro(); + test_local_not_linted(); } diff --git a/clippy_tests/examples/dlist.rs b/clippy_tests/examples/dlist.rs index a41bf1b52e0..b23aeb70a63 100644 --- a/clippy_tests/examples/dlist.rs +++ b/clippy_tests/examples/dlist.rs @@ -34,6 +34,11 @@ pub fn test_ret() -> Option> { unimplemented!(); } +pub fn test_local_not_linted() { + let _: LinkedList; +} + fn main(){ test(LinkedList::new()); + test_local_not_linted(); }