Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/doc/rustc-dev-guide/src/tests/directives.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ See [Controlling pass/fail expectations](ui.md#controlling-passfail-expectations
| `run-fail` | Program must exit with code `1..=127` | `ui` | N/A |
| `run-crash` | Program must crash | `ui` | N/A |
| `run-fail-or-crash` | Program must `run-fail` or `run-crash` | `ui` | N/A |
| `ignore-pass` | Ignore `--pass` flag | `ui` | N/A |
| `no-pass-override` | Ignore `--pass` flag | `ui` | N/A |
| `dont-check-failure-status` | Don't check exact failure status (i.e. `1`) | `ui`, `incremental` | N/A |
| `failure-status` | On failure, the compiler must exit with this status code. To expect an ICE, use `//@ failure-status: 101`. | `ui`, `incremental` | Any `u16` |
| `should-fail` | Compiletest self-test | All | N/A |
Expand Down
2 changes: 1 addition & 1 deletion src/doc/rustc-dev-guide/src/tests/running.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ There are a few options for running tests:

Pass UI tests now have three modes, `check-pass`, `build-pass` and `run-pass`.
When `--pass $mode` is passed, these tests will be forced to run under the given
`$mode` unless the directive `//@ ignore-pass` exists in the test file.
`$mode` unless the directive `//@ no-pass-override` exists in the test file.
For example, you can run all the tests in `tests/ui` as `check-pass`:

```text
Expand Down
2 changes: 1 addition & 1 deletion src/doc/rustc-dev-guide/src/tests/ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ Using `--pass check` can run the UI
test suite much faster (roughly twice as fast on my system), though obviously
not exercising as much.

The `ignore-pass` directive can be used to ignore the `--pass` CLI flag if the
The `no-pass-override` directive can be used to ignore the `--pass` CLI flag if the
test won't work properly with that override.


Expand Down
7 changes: 3 additions & 4 deletions src/tools/compiletest/src/directives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ pub(crate) struct TestProps {
/// None for non-UI tests, and for auxiliary crates used by UI tests.
pub(crate) pass_fail_mode: Option<PassFailMode>,
// Ignore `--pass` overrides from the command line for this test.
pub(crate) ignore_pass: bool,
pub(crate) no_pass_override: bool,
// rustdoc will test the output of the `--test` option
pub(crate) check_test_line_numbers_match: bool,
// customized normalization rules
Expand Down Expand Up @@ -244,7 +244,6 @@ mod directives {
pub(crate) const UNSET_RUSTC_ENV: &str = "unset-rustc-env";
pub(crate) const FORBID_OUTPUT: &str = "forbid-output";
pub(crate) const CHECK_TEST_LINE_NUMBERS_MATCH: &str = "check-test-line-numbers-match";
pub(crate) const IGNORE_PASS: &str = "ignore-pass";
pub(crate) const FAILURE_STATUS: &str = "failure-status";
pub(crate) const DONT_CHECK_FAILURE_STATUS: &str = "dont-check-failure-status";
pub(crate) const RUN_RUSTFIX: &str = "run-rustfix";
Expand Down Expand Up @@ -298,7 +297,7 @@ impl TestProps {
incremental: false,
known_bug: false,
pass_fail_mode: None,
ignore_pass: false,
no_pass_override: false,
check_test_line_numbers_match: false,
normalize_stdout: vec![],
normalize_stderr: vec![],
Expand Down Expand Up @@ -332,7 +331,7 @@ impl TestProps {

// copy over select properties to the aux build:
props.incremental_dir = self.incremental_dir.clone();
props.ignore_pass = true;
props.no_pass_override = true;
props.load_from(testfile, revision, config);

props
Expand Down
1 change: 0 additions & 1 deletion src/tools/compiletest/src/directives/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const EXTERNAL_IGNORES_LIST: &[&str] = &[
"ignore-gdb-version",
"ignore-llvm-version",
"ignore-parallel-frontend",
"ignore-pass",
// tidy-alphabetical-end
];

Expand Down
2 changes: 1 addition & 1 deletion src/tools/compiletest/src/directives/directive_names.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ pub(crate) const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
"ignore-nvptx64-nvidia-cuda",
"ignore-openbsd",
"ignore-parallel-frontend",
"ignore-pass",
"ignore-powerpc",
"ignore-powerpc64",
"ignore-remote",
Expand Down Expand Up @@ -201,6 +200,7 @@ pub(crate) const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
"needs-wasmtime",
"needs-xray",
"no-auto-check-cfg",
"no-pass-override",
"no-prefer-dynamic",
"normalize-stderr",
"normalize-stderr-32bit",
Expand Down
4 changes: 2 additions & 2 deletions src/tools/compiletest/src/directives/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ fn make_directive_handlers_map() -> HashMap<&'static str, Handler> {
multi_handler(PassFailMode::STR_VARIANTS, |config, ln, props| {
props.update_pass_fail_mode(ln, config);
}),
handler(IGNORE_PASS, |config, ln, props| {
config.set_name_directive(ln, IGNORE_PASS, &mut props.ignore_pass);
handler("no-pass-override", |config, ln, props| {
config.set_name_directive(ln, ln.name, &mut props.no_pass_override);
}),
multi_handler(
&[
Expand Down
4 changes: 2 additions & 2 deletions src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,9 @@ impl<'test> TestCx<'test> {
let declared = self.props.pass_fail_mode?;

// Specifying `--pass` only overrides `//@ pass-*` modes, and only if
// the test doesn't opt out with `//@ ignore-pass`.
// the test doesn't opt out with `//@ no-pass-override`.
if let Some(force_pass_mode) = self.config.force_pass_mode
&& !self.props.ignore_pass
&& !self.props.no_pass_override
&& declared.is_pass()
{
match force_pass_mode {
Expand Down
1 change: 0 additions & 1 deletion tests/ui/abi/vectorcall-abi-checks.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//@ add-minicore
//@ compile-flags: --crate-type=rlib --target=i586-unknown-linux-gnu -C target-feature=-sse,-sse2
//@ build-fail
//@ ignore-pass (test emits codegen-time errors)
//@ needs-llvm-components: x86
//@ ignore-backends: gcc
#![feature(no_core, abi_vectorcall)]
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/abi/vectorcall-abi-checks.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error: this function definition uses ABI "vectorcall" which requires the `sse2` target feature, which is not enabled
--> $DIR/vectorcall-abi-checks.rs:14:1
--> $DIR/vectorcall-abi-checks.rs:13:1
|
LL | pub extern "vectorcall" fn f() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
|
= help: consider enabling it globally (`-C target-feature=+sse2`) or locally (`#[target_feature(enable="sse2")]`)

error: this function call uses ABI "vectorcall" which requires the `sse2` target feature, which is not enabled in the caller
--> $DIR/vectorcall-abi-checks.rs:20:5
--> $DIR/vectorcall-abi-checks.rs:19:5
|
LL | f();
| ^^^ function called here
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/async-await/future-sizes/async-awaiting-fut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//@ needs-deterministic-layouts
//@ edition:2021
//@ build-pass
//@ ignore-pass
//@ no-pass-override (codegen affects -Zprint-type-sizes)
//@ only-x86_64

async fn wait() {}
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/async-await/future-sizes/large-arg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//@ needs-deterministic-layouts
//@ edition: 2021
//@ build-pass
//@ ignore-pass
//@ no-pass-override (codegen affects -Zprint-type-sizes)
//@ only-x86_64

pub async fn test() {
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/codegen/empty-static-libs-issue-108825.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//@ compile-flags: -Cpanic=abort --print=native-static-libs
//@ build-pass
//@ dont-check-compiler-stderr (libcore links `/defaultlib:msvcrt` or `/defaultlib:libcmt` on MSVC)
//@ ignore-pass (the note is emitted later in the compilation pipeline, needs build)
//@ no-pass-override (the note is emitted later in the compilation pipeline, needs build)

#![crate_type = "staticlib"]
#![no_std]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/codegen/remark-flag-functionality.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/90924>.

//@ build-pass
//@ ignore-pass
//@ no-pass-override (LLVM remarks are produced during codegen)
//@ revisions: all inline merge1 merge2
//@ compile-flags: --crate-type=lib -Cdebuginfo=1 -Copt-level=2

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/codegen/subtyping-enforces-type-equality.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ ignore-pass
//@ no-pass-override (regression test for an ICE in codegen, #115215)
//@ build-pass
//@ edition:2021
use std::future::Future;
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/consts/array-literal-index-oob.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//@ build-pass
//@ ignore-pass (test emits codegen-time warnings and verifies that they are not errors)
//@ no-pass-override (test emits codegen-time warnings and verifies that they are not errors)

#![warn(unconditional_panic)]

Expand Down
Loading
Loading