]> git.proxmox.com Git - rustc.git/blame - src/test/incremental/string_constant.rs
Update unsuspicious file list
[rustc.git] / src / test / incremental / string_constant.rs
CommitLineData
c295e0f8 1// revisions: cfail1 cfail2 cfail3 cfail4
5bcae85e 2// compile-flags: -Z query-dep-graph
c295e0f8
XL
3// [cfail3]compile-flags: -Zincremental-relative-spans
4// [cfail4]compile-flags: -Zincremental-relative-spans
416331ca 5// build-pass (FIXME(62277): could be check-pass?)
54a0048b
SL
6
7#![allow(warnings)]
8#![feature(rustc_attrs)]
abe05a73 9#![crate_type = "rlib"]
54a0048b
SL
10
11// Here the only thing which changes is the string constant in `x`.
12// Therefore, the compiler deduces (correctly) that typeck is not
13// needed even for callers of `x`.
54a0048b 14
abe05a73 15pub mod x {
c295e0f8 16 #[cfg(any(cfail1, cfail3))]
54a0048b 17 pub fn x() {
32a655c1 18 println!("{}", "1");
54a0048b
SL
19 }
20
c295e0f8
XL
21 #[cfg(any(cfail2, cfail4))]
22 #[rustc_clean(except = "hir_owner,hir_owner_nodes,optimized_mir,promoted_mir", cfg = "cfail2")]
23 #[rustc_clean(except = "hir_owner_nodes,promoted_mir", cfg = "cfail4")]
54a0048b 24 pub fn x() {
32a655c1 25 println!("{}", "2");
54a0048b
SL
26 }
27}
28
abe05a73 29pub mod y {
54a0048b
SL
30 use x;
31
c295e0f8
XL
32 #[rustc_clean(cfg = "cfail2")]
33 #[rustc_clean(cfg = "cfail4")]
54a0048b
SL
34 pub fn y() {
35 x::x();
36 }
37}
38
abe05a73 39pub mod z {
54a0048b
SL
40 use y;
41
c295e0f8
XL
42 #[rustc_clean(cfg = "cfail2")]
43 #[rustc_clean(cfg = "cfail4")]
54a0048b
SL
44 pub fn z() {
45 y::y();
46 }
47}