tests: use //@ ignore-auxiliary with backlinked primary test file

This commit is contained in:
Jieyou Xu 2025-04-17 17:22:56 +08:00
parent 6bbee334fd
commit 89cac55bb8
No known key found for this signature in database
GPG key ID: 045B995028EA6AFC
39 changed files with 37 additions and 49 deletions

View file

@ -1,4 +1,4 @@
//@ ignore-test: this is not a test
//@ ignore-auxiliary (used by `./main.rs`)
#[inline]
pub fn some_aux_mod_function() -> i32 {

View file

@ -1,4 +1,4 @@
//@ ignore-test (auxiliary, used by other tests)
//@ ignore-auxiliary (used by `./move-error-snippets.rs`)
macro_rules! aaa {
($c:ident) => {{

View file

@ -1,4 +1,4 @@
//@ ignore-test (auxiliary, used by other tests)
//@ ignore-auxiliary (used by `./two_files.rs`)
trait Foo { }

View file

@ -1,3 +1,3 @@
//@ ignore-test (auxiliary, used by other tests)
//@ ignore-auxiliary (used by `./inner-cfg-non-inline-mod.rs`)
#![cfg_attr(all(), cfg(FALSE))]

View file

@ -1,4 +1,4 @@
//@ ignore-test (auxiliary, used by other tests)
//@ ignore-auxiliary (used by `./main.rs`)
#![crate_type = "lib"]
macro_rules! underscore {

View file

@ -1 +1 @@
//@ ignore-test not a test, auxiliary
//@ ignore-auxiliary (used by `../../macro-expanded-mod.rs`)

View file

@ -1,3 +1,3 @@
//@ ignore-test not a test, auxiliary
//@ ignore-auxiliary (used by `../../macro-expanded-mod.rs`)
mod_decl!(bar);

View file

@ -1,4 +1,4 @@
//@ ignore-test auxiliary file for expansion-time.rs
//@ ignore-auxiliary (used by `./expansion-time.rs`)
1
2

View file

@ -1,4 +1,4 @@
//@ ignore-test: not a test
//@ ignore-auxiliary (used by `./root.rs`)
#[allow(tool::lint)]
pub fn foo() {}

View file

@ -1,3 +1,3 @@
//@ ignore-test: not a test
//@ ignore-auxiliary (used by `./lint-pre-expansion-extern-module.rs`)
pub fn try() {}

View file

@ -1,6 +1,4 @@
//@ ignore-test (auxiliary)
// Companion to allow-in-other-module.rs
//@ ignore-auxiliary (used by `./allow-in-other-module.rs`)
// This should not warn.
#![allow(not_a_real_lint)]

View file

@ -1,3 +1 @@
// ignore-test: this is not a test
1

View file

@ -1,3 +1 @@
// ignore-test: this is not a test
fn foo() { bar() }

View file

@ -1,4 +1,4 @@
//@ ignore-test auxiliary file for include-single-expr.rs
//@ ignore-auxiliary (used by `./include-single-expr.rs`)
0

View file

@ -1,4 +1,4 @@
//@ ignore-test auxiliary file for include-single-expr.rs
//@ ignore-auxiliary (used by `./include-single-expr.rs`)
0
10

View file

@ -1,3 +1,3 @@
//@ ignore-test -- this is an auxiliary file as part of another test.
//@ ignore-auxiliary (used by `../issue-69838-mods-relative-to-included-path.rs`)
pub fn i_am_in_bar() {}

View file

@ -1,3 +1,3 @@
//@ ignore-test -- this is an auxiliary file as part of another test.
//@ ignore-auxiliary (used by `../issue-69838-mods-relative-to-included-path.rs`)
pub mod bar;

View file

@ -1,4 +1,4 @@
//@ ignore-test (auxiliary, used by other tests)
//@ ignore-auxiliary (used by `../test.rs`)
macro_rules! m {
() => { include!("file.txt"); }

View file

@ -1,4 +1,3 @@
//
//@ ignore-test this is just a helper for the real test in this dir
//@ ignore-auxiliary (used by `./missing_non_modrs_mod.rs`)
mod missing;

View file

@ -1,4 +1,4 @@
//@ ignore-test this is just a helper for the real test in this dir
//@ ignore-auxiliary (used by `./missing_non_modrs_mod_inline.rs`)
mod inline {
mod missing;

View file

@ -1,5 +1,5 @@
error[E0583]: file not found for module `missing`
--> $DIR/foo.rs:4:1
--> $DIR/foo.rs:3:1
|
LL | mod missing;
| ^^^^^^^^^^^^

View file

@ -1,4 +1,3 @@
//@ run-pass
//@ ignore-test Not a test. Used by other tests
//@ ignore-auxiliary (used by `./mod_file_with_path_attr.rs` and `mod_file.rs`)
pub fn foo() -> isize { 10 }

View file

@ -1,3 +1,3 @@
//@ ignore-test Not a test. Used by other tests
//@ ignore-auxiliary (used by `./mod_file_correct_spans.rs`)
pub fn foo() -> isize { 10 }

View file

@ -1 +1 @@
//@ ignore-test not a test. aux file
//@ ignore-auxiliary (used by `./mod_file_disambig.rs`)

View file

@ -1 +1 @@
//@ ignore-test not a test. aux file
//@ ignore-auxiliary (used by `../mod_file_disambig.rs`)

View file

@ -1,6 +1,4 @@
//@ run-pass
//
//@ ignore-test: not a test, used by non_modrs_mods.rs
//@ ignore-auxiliary (used by `./non_modrs_mods.rs`)
pub mod inner_modrs_mod;
pub mod inner_foors_mod;

View file

@ -1,4 +1,4 @@
//@ ignore-test: not a test
//@ ignore-auxiliary (used by `./non_modrs_mods_and_inline_mods.rs`)
pub mod y {
pub mod z;

View file

@ -1 +1 @@
//@ ignore-test: not a test
//@ ignore-auxiliary (used by `../../../non_modrs_mods_and_inline_mods.rs`)

View file

@ -1,4 +1,4 @@
//@ ignore-test (auxiliary, used by other tests)
//@ ignore-auxiliary (used by `./saturating-float-casts.rs` and `./saturating-float-casts-wasm.rs`)
// Tests saturating float->int casts. See u128-as-f32.rs for the opposite direction.
//

View file

@ -1,4 +1,4 @@
//@ ignore-test: this is an auxiliary file for circular-modules-main.rs
//@ ignore-auxiliary (used by `./circular-modules-main.rs`)
#[path = "circular_modules_main.rs"]
mod circular_modules_main;

View file

@ -1,4 +1,4 @@
//@ ignore-test: this is an auxiliary file for circular-module-with-doc-comment-issue-97589.rs
//@ ignore-auxiliary (used by `./circular-module-with-doc-comment-issue-97589.rs`)
//! this comment caused the circular dependency checker to break

View file

@ -1,5 +1,4 @@
//@ run-pass
//@ ignore-test Not a test. Used by issue-48508.rs
//@ ignore-auxiliary (used by `./issue-48508.rs`)
pub fn other() -> f64 {
let µ = 1.0;

View file

@ -1 +1 @@
//@ ignore-test (auxiliary, used by other tests)
//@ ignore-auxiliary (used by `./attributes-on-modules-fail.rs`)

View file

@ -1,4 +1,4 @@
//@ ignore-test (auxiliary, used by other tests)
//@ ignore-auxiliary (used by `../inner-attr-non-inline-mod.rs`)
#![rustfmt::skip]
#![print_attr]

View file

@ -1 +1 @@
//@ ignore-test (auxiliary, used by other tests)
//@ ignore-auxiliary (used by `../attributes-on-modules-fail.rs`)

View file

@ -1,4 +1,4 @@
//@ ignore-test (auxiliary, used by other tests)
//@ ignore-auxiliary (used by `../../../pretty-print-hack-show.rs`)
#[derive(Print)]
enum ProceduralMasqueradeDummyType {

View file

@ -1,4 +1,4 @@
//@ ignore-test (auxiliary, used by other tests)
//@ ignore-auxiliary (used by `../../../pretty-print-hack-show.rs`)
#[derive(Print)]
enum ProceduralMasqueradeDummyType {

View file

@ -1,4 +1,4 @@
//@ ignore-test (auxiliary, used by other tests)
//@ ignore-auxiliary (used by `../../../pretty-print-hack/hide.rs`)
#[derive(Print)]
enum ProceduralMasqueradeDummyType {

View file

@ -1,5 +1,4 @@
//@ run-pass
//@ ignore-test: not a test, used by backtrace-debuginfo.rs to test file!()
//@ ignore-auxiliary (used by `./backtrace-debuginfo.rs` to test `file!()`)
#[inline(never)]
pub fn callback<F>(f: F) where F: FnOnce((&'static str, u32)) {