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