]> git.proxmox.com Git - rustc.git/blame - src/test/incremental/struct_remove_field.rs
Update unsuspicious file list
[rustc.git] / src / test / incremental / struct_remove_field.rs
CommitLineData
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)]
10pub struct X {
11 pub x: u32,
12 pub x2: u32,
13}
14
15#[cfg(rpass2)]
16pub struct X {
17 pub x: u32,
18}
19
20pub struct EmbedX {
21 x: X
22}
23
24pub struct Y {
25 pub y: char
26}
27
17df50a5 28#[rustc_clean(except="typeck,fn_sig", cfg="rpass2")]
3157f602
XL
29pub fn use_X(x: X) -> u32 {
30 x.x as u32
31}
32
17df50a5 33#[rustc_clean(except="typeck", cfg="rpass2")]
3157f602
XL
34pub fn use_EmbedX(embed: EmbedX) -> u32 {
35 embed.x.x as u32
36}
37
17df50a5 38#[rustc_clean(cfg="rpass2")]
3157f602
XL
39pub fn use_Y() {
40 let x: Y = Y { y: 'c' };
41}
42
43pub fn main() { }