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;
9 type Baz = LinkedList<u8>;
10 fn foo(_: LinkedList<u8>);
11 const BAR: Option<LinkedList<u8>>;
14 // Ok, we don’t want to warn for implementations; see issue #605.
15 impl Foo for LinkedList<u8> {
16 fn foo(_: LinkedList<u8>) {}
17 const BAR: Option<LinkedList<u8>> = None;
22 fn foo(_: LinkedList<u8>) {}
25 pub fn test(my_favourite_linked_list: LinkedList<u8>) {
26 println!("{:?}", my_favourite_linked_list)
29 pub fn test_ret() -> Option<LinkedList<u8>> {
33 pub fn test_local_not_linted() {
34 let _: LinkedList<u8>;
38 test(LinkedList::new());
39 test_local_not_linted();