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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
699 B
Rust
Raw Normal View History

2018-04-06 21:18:04 -05:00
// revisions:cfail1 cfail2 cfail3
// compile-flags: -Z query-dep-graph --test
2020-11-20 06:33:48 -06:00
// 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);
}
}