rust/tests/incremental/issue-49595/issue-49595.rs

32 lines
702 B
Rust
Raw Normal View History

//@ revisions:cfail1 cfail2 cfail3
//@ compile-flags: -Z query-dep-graph --test
//@ build-pass
2018-04-06 21:18:04 -05:00
#![feature(rustc_attrs)]
#![crate_type = "rlib"]
2018-07-20 20:04:02 -05:00
#![rustc_partition_codegened(module="issue_49595-tests", cfg="cfail2")]
2018-05-08 08:10:16 -05:00
#![rustc_partition_codegened(module="issue_49595-lit_test", cfg="cfail3")]
2018-04-06 21:18:04 -05:00
mod tests {
2018-07-20 20:04:02 -05:00
#[cfg_attr(not(cfail1), test)]
2018-04-06 21:18:04 -05:00
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);
}
}