]>
Commit | Line | Data |
---|---|---|
ea8adc8c XL |
1 | #![feature(plugin, alloc)] |
2 | #![feature(associated_type_defaults)] | |
3 | ||
abe05a73 | 4 | |
ea8adc8c XL |
5 | #![warn(clippy)] |
6 | #![allow(dead_code, needless_pass_by_value)] | |
7 | ||
8 | extern crate alloc; | |
9 | use alloc::linked_list::LinkedList; | |
10 | ||
11 | trait Foo { | |
12 | type Baz = LinkedList<u8>; | |
13 | fn foo(LinkedList<u8>); | |
14 | const BAR : Option<LinkedList<u8>>; | |
15 | } | |
16 | ||
17 | // ok, we don’t want to warn for implementations, see #605 | |
18 | impl Foo for LinkedList<u8> { | |
19 | fn foo(_: LinkedList<u8>) {} | |
20 | const BAR : Option<LinkedList<u8>> = None; | |
21 | } | |
22 | ||
23 | struct Bar; | |
24 | impl Bar { | |
25 | fn foo(_: LinkedList<u8>) {} | |
26 | } | |
27 | ||
28 | pub fn test(my_favourite_linked_list: LinkedList<u8>) { | |
29 | println!("{:?}", my_favourite_linked_list) | |
30 | } | |
31 | ||
32 | pub fn test_ret() -> Option<LinkedList<u8>> { | |
33 | unimplemented!(); | |
34 | } | |
35 | ||
36 | pub fn test_local_not_linted() { | |
37 | let _: LinkedList<u8>; | |
38 | } | |
39 | ||
40 | fn main(){ | |
41 | test(LinkedList::new()); | |
42 | test_local_not_linted(); | |
43 | } |