Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit f3eead1

Browse files
committed
Auto merge of rust-lang#80453 - petrochenkov:nocfail, r=Mark-Simulacrum
Remove `compile-fail` test suite By moving all of its tests to `ui` test suite. Now we have directives like `// dont-check-compiler-stderr` that allow to disable `.stderr` comparison for platform-dependent tests without introducing a whole new test suite.
2 parents 158f8d0 + 4d2d0ba commit f3eead1

File tree

116 files changed

+516
-196
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+516
-196
lines changed

compiler/rustc_hir/src/hir.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ pub struct Crate<'hir> {
607607
// over the ids in increasing order. In principle it should not
608608
// matter what order we visit things in, but in *practice* it
609609
// does, because it can affect the order in which errors are
610-
// detected, which in turn can make compile-fail tests yield
610+
// detected, which in turn can make UI tests yield
611611
// slightly different results.
612612
pub items: BTreeMap<HirId, Item<'hir>>,
613613

compiler/rustc_incremental/src/assert_dep_graph.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
//! In this code, we report errors on each `rustc_if_this_changed`
1313
//! annotation. If a path exists in all cases, then we would report
1414
//! "all path(s) exist". Otherwise, we report: "no path to `foo`" for
15-
//! each case where no path exists. `compile-fail` tests can then be
15+
//! each case where no path exists. `ui` tests can then be
1616
//! used to check when paths exist or do not.
1717
//!
1818
//! The full form of the `rustc_if_this_changed` annotation is

compiler/rustc_interface/src/passes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,7 @@ fn analysis(tcx: TyCtxt<'_>, cnum: CrateNum) -> Result<()> {
889889

890890
// Avoid overwhelming user with errors if borrow checking failed.
891891
// I'm not sure how helpful this is, to be honest, but it avoids a
892-
// lot of annoying errors in the compile-fail tests (basically,
892+
// lot of annoying errors in the ui tests (basically,
893893
// lint warnings and so on -- kindck used to do this abort, but
894894
// kindck is gone now). -nmatsakis
895895
if sess.has_errors() {

compiler/rustc_interface/src/queries.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ impl<'tcx> Queries<'tcx> {
280280
// Don't do code generation if there were any errors
281281
self.session().compile_status()?;
282282

283-
// Hook for compile-fail tests.
283+
// Hook for UI tests.
284284
Self::check_for_rustc_errors_attr(tcx);
285285

286286
Ok(passes::start_codegen(&***self.codegen_backend(), tcx, &*outputs.peek()))
@@ -289,7 +289,7 @@ impl<'tcx> Queries<'tcx> {
289289
}
290290

291291
/// Check for the `#[rustc_error]` annotation, which forces an error in codegen. This is used
292-
/// to write compile-fail tests that actually test that compilation succeeds without reporting
292+
/// to write UI tests that actually test that compilation succeeds without reporting
293293
/// an error.
294294
fn check_for_rustc_errors_attr(tcx: TyCtxt<'_>) {
295295
let def_id = match tcx.entry_fn(LOCAL_CRATE) {

compiler/rustc_mir/src/transform/rustc_peek.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ impl<'tcx> MirPass<'tcx> for SanityCheck {
9292
/// "rustc_peek: bit not set".
9393
///
9494
/// The intention is that one can write unit tests for dataflow by
95-
/// putting code into a compile-fail test and using `rustc_peek` to
95+
/// putting code into an UI test and using `rustc_peek` to
9696
/// make observations about the results of dataflow static analyses.
9797
///
9898
/// (If there are any calls to `rustc_peek` that do not match the

compiler/rustc_resolve/src/build_reduced_graph.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ impl<'a, 'b> BuildReducedGraphVisitor<'a, 'b> {
525525
ModuleKind::Block(..) => unreachable!(),
526526
};
527527
// HACK(eddyb) unclear how good this is, but keeping `$crate`
528-
// in `source` breaks `src/test/compile-fail/import-crate-var.rs`,
528+
// in `source` breaks `src/test/ui/imports/import-crate-var.rs`,
529529
// while the current crate doesn't have a valid `crate_name`.
530530
if crate_name != kw::Invalid {
531531
// `crate_name` should not be interpreted as relative.

compiler/rustc_trait_selection/src/infer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ impl<'tcx> OutlivesEnvironmentExt<'tcx> for OutlivesEnvironment<'tcx> {
162162
/// 'b` (and hence, transitively, that `T: 'a`). This method would
163163
/// add those assumptions into the outlives-environment.
164164
///
165-
/// Tests: `src/test/compile-fail/regions-free-region-ordering-*.rs`
165+
/// Tests: `src/test/ui/regions/regions-free-region-ordering-*.rs`
166166
fn add_implied_bounds(
167167
&mut self,
168168
infcx: &InferCtxt<'a, 'tcx>,

compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
558558
// where-clause or, in the case of an object type,
559559
// it could be that the object type lists the
560560
// trait (e.g., `Foo+Send : Send`). See
561-
// `compile-fail/typeck-default-trait-impl-send-param.rs`
561+
// `ui/typeck/typeck-default-trait-impl-send-param.rs`
562562
// for an example of a test case that exercises
563563
// this path.
564564
}

compiler/rustc_typeck/src/collect.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1767,8 +1767,7 @@ fn gather_explicit_predicates_of(tcx: TyCtxt<'_>, def_id: DefId) -> ty::GenericP
17671767
const NO_GENERICS: &hir::Generics<'_> = &hir::Generics::empty();
17681768

17691769
// We use an `IndexSet` to preserves order of insertion.
1770-
// Preserving the order of insertion is important here so as not to break
1771-
// compile-fail UI tests.
1770+
// Preserving the order of insertion is important here so as not to break UI tests.
17721771
let mut predicates: FxIndexSet<(ty::Predicate<'_>, Span)> = FxIndexSet::default();
17731772

17741773
let ast_generics = match node {

src/bootstrap/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ build/
201201
# Output for all compiletest-based test suites
202202
test/
203203
ui/
204-
compile-fail/
205204
debuginfo/
206205
...
207206

0 commit comments

Comments
 (0)