Rollup merge of #147217 - Zalathar:true, r=petrochenkov

Don't create a top-level `true` directory when running UI tests

The funny thing about writing `-Cincremental=true` is that it *does* enable incremental compilation ... using an incremental compilation dir of `./true`.

And for UI tests, that ends up creating a `true` directory in the repository root, which is annoying.

Fortunately, compiletest has an existing `//@ incremental` directive that takes care of creating an empty incremental directory, and passing it to `-Cincremental`.

---

I have manually checked that reverting rust-lang/rust#146649 still causes the updated test to fail.
This commit is contained in:
Stuart Cook 2025-10-01 22:15:03 +10:00 committed by GitHub
commit de20efd01e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View file

@ -1,5 +1,6 @@
//@ add-core-stubs
//@ compile-flags: --target thumbv8m.main-none-eabi --crate-type lib -Cincremental=true
//@ compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
//@ incremental (required to trigger the bug)
//@ needs-llvm-components: arm
#![feature(abi_cmse_nonsecure_call, no_core)]
#![no_core]
@ -8,7 +9,7 @@ extern crate minicore;
use minicore::*;
// A regression test for https://github.com/rust-lang/rust/issues/131639.
// NOTE: -Cincremental=true was required for triggering the bug.
// NOTE: `-Cincremental` was required for triggering the bug.
fn foo() {
id::<extern "cmse-nonsecure-call" fn(&'a ())>(PhantomData);

View file

@ -1,5 +1,5 @@
error[E0261]: use of undeclared lifetime name `'a`
--> $DIR/undeclared-lifetime.rs:14:43
--> $DIR/undeclared-lifetime.rs:15:43
|
LL | id::<extern "cmse-nonsecure-call" fn(&'a ())>(PhantomData);
| ^^ undeclared lifetime