1 #![feature(associated_type_defaults)]
2 #![warn(clippy::linkedlist)]
3 #![allow(dead_code, clippy::needless_pass_by_value)]
6 use alloc::collections::linked_list::LinkedList;
8 const C: LinkedList<i32> = LinkedList::new();
9 static S: LinkedList<i32> = LinkedList::new();
12 type Baz = LinkedList<u8>;
13 fn foo(_: LinkedList<u8>);
14 const BAR: Option<LinkedList<u8>>;
17 // Ok, we don’t want to warn for implementations; see issue #605.
18 impl Foo for LinkedList<u8> {
19 fn foo(_: LinkedList<u8>) {}
20 const BAR: Option<LinkedList<u8>> = None;
25 fn foo(_: LinkedList<u8>) {}
28 pub fn test(my_favourite_linked_list: LinkedList<u8>) {
29 println!("{:?}", my_favourite_linked_list)
32 pub fn test_ret() -> Option<LinkedList<u8>> {
36 pub fn test_local_not_linted() {
37 let _: LinkedList<u8>;
41 test(LinkedList::new());
42 test_local_not_linted();