summary refs log tree commit diff
path: root/src/test/incremental/issue-49595/issue-49595.rs
blob: ab4d76eef364c7ad1484c44217bf8eb5b889ff2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// revisions:cfail1 cfail2 cfail3
// compile-flags: -Z query-dep-graph --test
// build-pass (FIXME(62277): could be check-pass?)

#![feature(rustc_attrs)]
#![crate_type = "rlib"]

#![rustc_partition_codegened(module="issue_49595-tests", cfg="cfail2")]
#![rustc_partition_codegened(module="issue_49595-lit_test", cfg="cfail3")]

mod tests {
    #[cfg_attr(not(cfail1), test)]
    fn test() {
    }
}


// Checks that changing a string literal without changing its span
// takes effect.

// replacing a module to have a stable span
#[cfg_attr(not(cfail3), path = "auxiliary/lit_a.rs")]
#[cfg_attr(cfail3, path = "auxiliary/lit_b.rs")]
mod lit;

pub mod lit_test {
    #[test]
    fn lit_test() {
        println!("{}", ::lit::A);
    }
}