]>
git.proxmox.com Git - rustc.git/blob - src/test/incremental/hashes/exported_vs_not.rs
1 // build-pass (FIXME(62277): could be check-pass?)
2 // revisions: cfail1 cfail2 cfail3
3 // compile-flags: -Z query-dep-graph -Zincremental-ignore-spans
6 #![feature(rustc_attrs)]
9 // Case 1: The function body is not exported to metadata. If the body changes,
10 // the hash of the HirBody node should change, but not the hash of
11 // either the Hir or the Metadata node.
14 pub fn body_not_exported_to_metadata() -> u32 {
19 #[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir")]
20 #[rustc_clean(cfg="cfail3")]
21 pub fn body_not_exported_to_metadata() -> u32 {
27 // Case 2: The function body *is* exported to metadata because the function is
28 // marked as #[inline]. Only the hash of the Hir depnode should be
29 // unaffected by a change to the body.
33 pub fn body_exported_to_metadata_because_of_inline() -> u32 {
38 #[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir")]
39 #[rustc_clean(cfg="cfail3")]
41 pub fn body_exported_to_metadata_because_of_inline() -> u32 {
47 // Case 2: The function body *is* exported to metadata because the function is
48 // generic. Only the hash of the Hir depnode should be
49 // unaffected by a change to the body.
53 pub fn body_exported_to_metadata_because_of_generic() -> u32 {
58 #[rustc_clean(cfg="cfail2", except="HirBody,mir_built,optimized_mir")]
59 #[rustc_clean(cfg="cfail3")]
61 pub fn body_exported_to_metadata_because_of_generic() -> u32 {