1 #![feature(tool_lints)]
4 #![feature(associated_type_defaults)]
7 #![warn(clippy::linkedlist)]
8 #![allow(dead_code, clippy::needless_pass_by_value)]
11 use alloc::collections::linked_list::LinkedList;
14 type Baz = LinkedList<u8>;
15 fn foo(LinkedList<u8>);
16 const BAR : Option<LinkedList<u8>>;
19 // ok, we don’t want to warn for implementations, see #605
20 impl Foo for LinkedList<u8> {
21 fn foo(_: LinkedList<u8>) {}
22 const BAR : Option<LinkedList<u8>> = None;
27 fn foo(_: LinkedList<u8>) {}
30 pub fn test(my_favourite_linked_list: LinkedList<u8>) {
31 println!("{:?}", my_favourite_linked_list)
34 pub fn test_ret() -> Option<LinkedList<u8>> {
38 pub fn test_local_not_linted() {
39 let _: LinkedList<u8>;
43 test(LinkedList::new());
44 test_local_not_linted();