]>
Commit | Line | Data |
---|---|---|
abe05a73 XL |
1 | |
2 | ||
ea8adc8c XL |
3 | #![warn(items_after_statements)] |
4 | ||
5 | fn ok() { | |
6 | fn foo() { println!("foo"); } | |
7 | foo(); | |
8 | } | |
9 | ||
10 | fn last() { | |
11 | foo(); | |
12 | fn foo() { println!("foo"); } | |
13 | } | |
14 | ||
15 | fn main() { | |
16 | foo(); | |
17 | fn foo() { println!("foo"); } | |
18 | foo(); | |
19 | } | |
20 | ||
21 | fn mac() { | |
22 | let mut a = 5; | |
23 | println!("{}", a); | |
24 | // do not lint this, because it needs to be after `a` | |
25 | macro_rules! b { | |
26 | () => {{ a = 6 }} | |
27 | } | |
28 | b!(); | |
29 | println!("{}", a); | |
30 | } |