]>
Commit | Line | Data |
---|---|---|
3157f602 XL |
1 | // Test incremental compilation tracking where we change field names |
2 | // in between revisions (hashing should be stable). | |
3 | ||
4 | // revisions:rpass1 rpass2 | |
5bcae85e | 5 | // compile-flags: -Z query-dep-graph |
3157f602 XL |
6 | |
7 | #![feature(rustc_attrs)] | |
8 | ||
9 | #[cfg(rpass1)] | |
10 | pub struct X { | |
11 | pub x: u32, | |
12 | pub x2: u32, | |
13 | } | |
14 | ||
15 | #[cfg(rpass2)] | |
16 | pub struct X { | |
17 | pub x: u32, | |
18 | } | |
19 | ||
20 | pub struct EmbedX { | |
21 | x: X | |
22 | } | |
23 | ||
24 | pub struct Y { | |
25 | pub y: char | |
26 | } | |
27 | ||
17df50a5 | 28 | #[rustc_clean(except="typeck,fn_sig", cfg="rpass2")] |
3157f602 XL |
29 | pub fn use_X(x: X) -> u32 { |
30 | x.x as u32 | |
31 | } | |
32 | ||
17df50a5 | 33 | #[rustc_clean(except="typeck", cfg="rpass2")] |
3157f602 XL |
34 | pub fn use_EmbedX(embed: EmbedX) -> u32 { |
35 | embed.x.x as u32 | |
36 | } | |
37 | ||
17df50a5 | 38 | #[rustc_clean(cfg="rpass2")] |
3157f602 XL |
39 | pub fn use_Y() { |
40 | let x: Y = Y { y: 'c' }; | |
41 | } | |
42 | ||
43 | pub fn main() { } |