mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-26 13:01:27 +03:00
72abf370bb
Long ago, UI tests were divided into "compile" and "run" tests. Later, the compile tests were further subdivided into "check" and "build" tests, to speed up tests that don't need a full build. The same split was never applied to incremental test revisions, so the only way to perform a check build in incremental tests is (confusingly) to use a `cfail` revision and then specify `//@ check-fail` or `//@ check-pass`. This PR makes room for dedicated check-fail and check-pass revisions by renaming the existing `cfail` and `cpass` revisions to `bfail` and `bpass`, since they currently perform a full build.
50 lines
1.2 KiB
Rust
50 lines
1.2 KiB
Rust
//@ revisions: rpass1 bfail2
|
|
//@ compile-flags: -Z query-dep-graph
|
|
//@ ignore-backends: gcc
|
|
|
|
#![allow(warnings)]
|
|
#![feature(rustc_attrs)]
|
|
|
|
// Sanity check for the dirty-clean system. Give the opposite
|
|
// annotations that we expect to see, so that we check that errors are
|
|
// reported.
|
|
|
|
fn main() { }
|
|
|
|
mod x {
|
|
#[cfg(rpass1)]
|
|
pub fn x() -> usize {
|
|
22
|
|
}
|
|
|
|
#[cfg(bfail2)]
|
|
pub fn x() -> u32 {
|
|
22
|
|
}
|
|
}
|
|
|
|
mod y {
|
|
use x;
|
|
|
|
#[rustc_clean(
|
|
except="opt_hir_owner_nodes,generics_of,predicates_of,type_of,fn_sig",
|
|
cfg="bfail2",
|
|
)]
|
|
pub fn y() {
|
|
//[bfail2]~^ ERROR `opt_hir_owner_nodes(y)` should be dirty but is not
|
|
//[bfail2]~| ERROR `generics_of(y)` should be dirty but is not
|
|
//[bfail2]~| ERROR `predicates_of(y)` should be dirty but is not
|
|
//[bfail2]~| ERROR `type_of(y)` should be dirty but is not
|
|
//[bfail2]~| ERROR `fn_sig(y)` should be dirty but is not
|
|
//[bfail2]~| ERROR `typeck_root(y)` should be clean but is not
|
|
x::x();
|
|
}
|
|
}
|
|
|
|
mod z {
|
|
#[rustc_clean(except="typeck_root", cfg="bfail2")]
|
|
pub fn z() {
|
|
//[bfail2]~^ ERROR `typeck_root(z)` should be dirty but is not
|
|
}
|
|
}
|