#![feature(alloc)] #![feature(associated_type_defaults)] #![warn(linkedlist)] #![allow(dead_code, needless_pass_by_value)] extern crate alloc; use alloc::linked_list::LinkedList; trait Foo { type Baz = LinkedList; fn foo(LinkedList); const BAR : Option>; } // ok, we don’t want to warn for implementations, see #605 impl Foo for LinkedList { fn foo(_: LinkedList) {} const BAR : Option> = None; } struct Bar; impl Bar { fn foo(_: LinkedList) {} } pub fn test(my_favourite_linked_list: LinkedList) { println!("{:?}", my_favourite_linked_list) } pub fn test_ret() -> Option> { unimplemented!(); } pub fn test_local_not_linted() { let _: LinkedList; } fn main(){ test(LinkedList::new()); test_local_not_linted(); }