Rollup merge of #147209 - jieyouxu:remove-no-remap-src-base, r=Zalathar

Remove `no-remap-src-base` from tests

Previously in the `//`-compiletest-directive times, `no-remap-src-base` was implemented as a special `no-*` directive parsing. In the migration from `//` -> `//`@`,` the `// no-remap-src-base` directive was lost, most likely because it had no effect -- the default is not remapping `src-base`.

So remove occurrences of `no-remap-src-base`, as these are not valid directives.

r? `@Zalathar` (since we discussed this on discord, or compiler)
This commit is contained in:
Stuart Cook 2025-10-01 22:15:02 +10:00 committed by GitHub
commit f50c76f2fa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 5 additions and 8 deletions

View file

@ -2,7 +2,6 @@
// Testing that a librustc_ast can parse modules with canonicalized base path
//@ ignore-cross-compile
//@ ignore-remote
// no-remap-src-base: Reading `file!()` (expectedly) fails when enabled.
#![feature(rustc_private)]

View file

@ -1,4 +1,4 @@
//@ compile-flags: --remap-path-prefix={{src-base}}/errors/auxiliary=remapped-aux
// no-remap-src-base: Manually remap, so the remapped path remains in .stderr file.
// Manually remap, so the remapped path remains in .stderr file.
pub struct SomeStruct {} // This line should be show as part of the error.

View file

@ -1,5 +1,5 @@
error[E0423]: expected value, found struct `remapped_dep::SomeStruct`
--> $DIR/remap-path-prefix-reverse.rs:16:13
--> $DIR/remap-path-prefix-reverse.rs:15:13
|
LL | let _ = remapped_dep::SomeStruct;
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: use struct literal syntax instead: `remapped_dep::SomeStruct {}`

View file

@ -1,5 +1,5 @@
error[E0423]: expected value, found struct `remapped_dep::SomeStruct`
--> $DIR/remap-path-prefix-reverse.rs:16:13
--> $DIR/remap-path-prefix-reverse.rs:15:13
|
LL | let _ = remapped_dep::SomeStruct;
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: use struct literal syntax instead: `remapped_dep::SomeStruct {}`

View file

@ -2,7 +2,6 @@
//@ compile-flags: --remap-path-prefix={{src-base}}/errors/auxiliary=remapped-aux
//@ revisions: local-self remapped-self
// [local-self] no-remap-src-base: The hack should work regardless of remapping.
//@ [remapped-self] remap-src-base
// Verify that the expected source code is shown.

View file

@ -2,7 +2,7 @@
//@ compile-flags: --remap-path-prefix={{src-base}}=remapped
//@ [with-diagnostic-scope]compile-flags: -Zremap-path-scope=diagnostics
//@ [without-diagnostic-scope]compile-flags: -Zremap-path-scope=object
// no-remap-src-base: Manually remap, so the remapped path remains in .stderr file.
// Manually remap, so the remapped path remains in .stderr file.
// The remapped paths are not normalized by compiletest.
//@ normalize-stderr: "\\(errors)" -> "/$1"

View file

@ -1,6 +1,6 @@
//@ proc-macro: expand-expr.rs
//@ ignore-backends: gcc
// no-remap-src-base: check_expand_expr_file!() fails when enabled.
// No `remap-src-base`, since `check_expand_expr_file!()` fails when enabled.
#![feature(concat_bytes)]
extern crate expand_expr;

View file

@ -1,7 +1,6 @@
//@ proc-macro: test-macros.rs
//@ compile-flags: -Z span-debug
//@ revisions: local remapped
// [local] no-remap-src-base: The hack should work regardless of remapping.
//@ [remapped] remap-src-base
#![no_std] // Don't load unnecessary hygiene information from std