]> git.proxmox.com Git - rustc.git/blame - src/test/incremental/hash-module-order.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / incremental / hash-module-order.rs
CommitLineData
a2a8927a
XL
1// revisions: rpass1 rpass2
2// compile-flags: -Z incremental-ignore-spans -Z query-dep-graph
3
4// Tests that module hashing depends on the order of the items
5// (since the order is exposed through `Mod.item_ids`).
6// Changing the order of items (while keeping `Span`s the same)
7// should still result in `hir_owner` being invalidated.
8// Note that it's possible to keep the spans unchanged using
9// a proc-macro (e.g. producing the module via `quote!`)
10// but we use `-Z incremental-ignore-spans` for simplicity
11
12#![feature(rustc_attrs)]
13
14#[cfg(rpass1)]
15#[rustc_clean(cfg="rpass1",except="hir_owner")]
16mod foo {
17 struct First;
18 struct Second;
19}
20
21#[cfg(rpass2)]
22#[rustc_clean(cfg="rpass2",except="hir_owner")]
23mod foo {
24 struct Second;
25 struct First;
26}
27
28fn main() {}