tests: remove no-remap-src-base

Previously in the `//`-compiletest-directive times, this 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.
This commit is contained in:
Jieyou Xu
2025-10-01 13:31:42 +08:00
parent fa3155a644
commit ec893d1a64
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