Skip to content

Commit 873ecba

Browse files
Auto merge of #143002 - Enselic:tests-ui-run-fail-exit-vs-signal, r=<try>
tests: Require `run-fail` ui tests to have an exit code (`SIGABRT` not ok) Normally a `run-fail` ui test shall not be terminated by a signal like `SIGABRT`. So begin having that as a hard requirement. Some of our current tests do terminate by a signal however. Introduce and use `run-fail-without-exit-code` for those tests. This adds further (cc #142304, #142886) protection against the regression in #123733 since that bug also manifested as `SIGABRT` in `tests/ui/panics/panic-main.rs` (shown as `Aborted (core dumped)` in the logs attached to that issue, and I have also been able to reproduce this locally). ### TODO - [ ] what about on Windows? - [ ] also update docs at https://rustc-dev-guide.rust-lang.org/tests/directives.html#controlling-outcome-expectations - [ ] clean up the code ### Zulip discussion See https://rust-lang.zulipchat.com/#narrow/channel/122651-general/topic/compiletest.3A.20terminate.20by.20signal.20vs.20exit.20with.20error/with/525611235 try-job: x86_64-msvc-1 try-job: x86_64-msvc-2
2 parents a17780d + 17be091 commit 873ecba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+132
-75
lines changed

src/tools/compiletest/src/common.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,22 @@ string_enum! {
110110
}
111111
}
112112

113+
#[derive(Copy, Clone, Debug, PartialEq, PartialOrd)]
114+
pub enum RunFailMode {
115+
/// Running the program must exit with an exit code >= 1 && <= 127. If the
116+
/// program is terminated by a signal (or the exit code indicates abnormal
117+
/// exit) the test will fail.
118+
FailureExitCode,
119+
/// The running program must have crashed, e.g. by SIGABRT on Unix or
120+
/// Windows by setting an appropriate NTSTATUS high bit in the exit code.
121+
Crash,
122+
}
123+
113124
#[derive(Copy, Clone, Debug, PartialEq, PartialOrd)]
114125
pub enum FailMode {
115126
Check,
116127
Build,
117-
Run,
128+
Run(RunFailMode),
118129
}
119130

120131
string_enum! {

src/tools/compiletest/src/directive-list.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
241241
"regex-error-pattern",
242242
"remap-src-base",
243243
"revisions",
244+
"run-crash",
244245
"run-fail",
245246
"run-flags",
246247
"run-pass",

src/tools/compiletest/src/header.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use camino::{Utf8Path, Utf8PathBuf};
99
use semver::Version;
1010
use tracing::*;
1111

12-
use crate::common::{Config, Debugger, FailMode, Mode, PassMode};
12+
use crate::common::{Config, Debugger, FailMode, Mode, PassMode, RunFailMode};
1313
use crate::debuggers::{extract_cdb_version, extract_gdb_version};
1414
use crate::errors::ErrorKind;
1515
use crate::executor::{CollectedTestDesc, ShouldPanic};
@@ -655,7 +655,10 @@ impl TestProps {
655655
Some(FailMode::Build)
656656
} else if config.parse_name_directive(ln, "run-fail") {
657657
check_ui("run");
658-
Some(FailMode::Run)
658+
Some(FailMode::Run(RunFailMode::FailureExitCode))
659+
} else if config.parse_name_directive(ln, "run-crash") {
660+
check_ui("run");
661+
Some(FailMode::Run(RunFailMode::Crash))
659662
} else {
660663
None
661664
};

src/tools/compiletest/src/runtest.rs

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ use tracing::*;
1717

1818
use crate::common::{
1919
Assembly, Codegen, CodegenUnits, CompareMode, Config, CoverageMap, CoverageRun, Crashes,
20-
DebugInfo, Debugger, FailMode, Incremental, MirOpt, PassMode, Pretty, RunMake, Rustdoc,
21-
RustdocJs, RustdocJson, TestPaths, UI_EXTENSIONS, UI_FIXED, UI_RUN_STDERR, UI_RUN_STDOUT,
22-
UI_STDERR, UI_STDOUT, UI_SVG, UI_WINDOWS_SVG, Ui, expected_output_path, incremental_dir,
23-
output_base_dir, output_base_name, output_testname_unique,
20+
DebugInfo, Debugger, FailMode, Incremental, MirOpt, PassMode, Pretty, RunFailMode, RunMake,
21+
Rustdoc, RustdocJs, RustdocJson, TestPaths, UI_EXTENSIONS, UI_FIXED, UI_RUN_STDERR,
22+
UI_RUN_STDOUT, UI_STDERR, UI_STDOUT, UI_SVG, UI_WINDOWS_SVG, Ui, expected_output_path,
23+
incremental_dir, output_base_dir, output_base_name, output_testname_unique,
2424
};
2525
use crate::compute_diff::{DiffLine, make_diff, write_diff, write_filtered_diff};
2626
use crate::errors::{Error, ErrorKind, load_errors};
@@ -277,7 +277,11 @@ impl<'test> TestCx<'test> {
277277

278278
fn should_run(&self, pm: Option<PassMode>) -> WillExecute {
279279
let test_should_run = match self.config.mode {
280-
Ui if pm == Some(PassMode::Run) || self.props.fail_mode == Some(FailMode::Run) => true,
280+
Ui if pm == Some(PassMode::Run)
281+
|| matches!(self.props.fail_mode, Some(FailMode::Run(_))) =>
282+
{
283+
true
284+
}
281285
MirOpt if pm == Some(PassMode::Run) => true,
282286
Ui | MirOpt => false,
283287
mode => panic!("unimplemented for mode {:?}", mode),
@@ -296,6 +300,13 @@ impl<'test> TestCx<'test> {
296300
}
297301
}
298302

303+
fn must_have_exit_code(&self) -> bool {
304+
match self.config.mode {
305+
Ui => self.props.fail_mode == Some(FailMode::Run(RunFailMode::FailureExitCode)),
306+
mode => panic!("unimplemented for mode {:?}", mode),
307+
}
308+
}
309+
299310
fn should_compile_successfully(&self, pm: Option<PassMode>) -> bool {
300311
match self.config.mode {
301312
RustdocJs => true,

src/tools/compiletest/src/runtest/ui.rs

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,45 @@ impl TestCx<'_> {
140140
&proc_res,
141141
);
142142
}
143+
#[derive(Copy, Clone, Debug, PartialEq, PartialOrd)]
144+
enum DetailedExitStatus {
145+
ExitWithSuccess,
146+
ExitWithFailure { code: i32 },
147+
Crashed { code: Option<i32> },
148+
}
149+
fn code_is_proper_failure_exit_code(code: i32) -> bool {
150+
code >= 1 && code <= 127
151+
}
152+
let code = proc_res.status.code();
153+
let actual_status = if proc_res.status.success() {
154+
DetailedExitStatus::ExitWithSuccess
155+
} else if let Some(code) = code
156+
&& code_is_proper_failure_exit_code(code)
157+
{
158+
DetailedExitStatus::ExitWithFailure { code }
159+
} else {
160+
DetailedExitStatus::Crashed { code }
161+
};
143162
if self.should_run_successfully(pm) {
144-
if !proc_res.status.success() {
145-
self.fatal_proc_rec("test run failed!", &proc_res);
163+
if actual_status != DetailedExitStatus::ExitWithSuccess {
164+
self.fatal_proc_rec(
165+
&format!("test run failed! got {actual_status:?}"),
166+
&proc_res,
167+
);
146168
}
147-
} else if proc_res.status.success() {
148-
self.fatal_proc_rec("test run succeeded!", &proc_res);
169+
} else if self.must_have_exit_code() {
170+
if !matches!(actual_status, DetailedExitStatus::ExitWithFailure { .. }) {
171+
self.fatal_proc_rec(
172+
&format!("test did not exit with failure code! got {actual_status:?}"),
173+
&proc_res,
174+
);
175+
}
176+
} else if !matches!(actual_status, DetailedExitStatus::Crashed { .. }) {
177+
self.fatal_proc_rec(
178+
&format!("test did not crash! got {actual_status:?}"),
179+
&proc_res,
180+
);
149181
}
150-
151182
self.get_output(&proc_res)
152183
} else {
153184
self.get_output(&proc_res)

tests/ui/contracts/contract-attributes-generics.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
//@ [unchk_pass] run-pass
66
//@ [chk_pass] run-pass
77
//
8-
//@ [chk_fail_pre] run-fail
9-
//@ [chk_fail_post] run-fail
10-
//@ [chk_const_fail] run-fail
8+
//@ [chk_fail_pre] run-crash
9+
//@ [chk_fail_post] run-crash
10+
//@ [chk_const_fail] run-crash
1111
//
1212
//@ [unchk_pass] compile-flags: -Zcontract-checks=no
1313
//

tests/ui/contracts/contract-attributes-nest.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
//@ [unchk_fail_post] run-pass
66
//@ [chk_pass] run-pass
77
//
8-
//@ [chk_fail_pre] run-fail
9-
//@ [chk_fail_post] run-fail
8+
//@ [chk_fail_pre] run-crash
9+
//@ [chk_fail_post] run-crash
1010
//
1111
//@ [unchk_pass] compile-flags: -Zcontract-checks=no
1212
//@ [unchk_fail_pre] compile-flags: -Zcontract-checks=no

tests/ui/contracts/contract-attributes-tail.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
//@ [unchk_fail_post] run-pass
66
//@ [chk_pass] run-pass
77
//
8-
//@ [chk_fail_pre] run-fail
9-
//@ [chk_fail_post] run-fail
8+
//@ [chk_fail_pre] run-crash
9+
//@ [chk_fail_post] run-crash
1010
//
1111
//@ [unchk_pass] compile-flags: -Zcontract-checks=no
1212
//@ [unchk_fail_pre] compile-flags: -Zcontract-checks=no

tests/ui/contracts/contract-captures-via-closure-copy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ run-fail
1+
//@ run-crash
22
//@ compile-flags: -Zcontract-checks=yes
33

44
#![feature(contracts)]

tests/ui/contracts/contract-const-fn.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
//
99
//@ [all_pass] run-pass
1010
//
11-
//@ [runtime_fail_pre] run-fail
12-
//@ [runtime_fail_post] run-fail
11+
//@ [runtime_fail_pre] run-crash
12+
//@ [runtime_fail_post] run-crash
1313
//
1414
//@ [all_pass] compile-flags: -Zcontract-checks=yes
1515
//@ [runtime_fail_pre] compile-flags: -Zcontract-checks=yes

tests/ui/contracts/contracts-ensures-early-fn-exit.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
//
33
//@ [unchk_pass] run-pass
44
//@ [chk_pass] run-pass
5-
//@ [chk_fail_try] run-fail
6-
//@ [chk_fail_ret] run-fail
7-
//@ [chk_fail_yeet] run-fail
5+
//@ [chk_fail_try] run-crash
6+
//@ [chk_fail_ret] run-crash
7+
//@ [chk_fail_yeet] run-crash
88
//
99
//@ [unchk_pass] compile-flags: -Zcontract-checks=no
1010
//@ [chk_pass] compile-flags: -Zcontract-checks=yes

tests/ui/contracts/internal_machinery/contract-ast-extensions-nest.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
//@ [unchk_fail_post] run-pass
66
//@ [chk_pass] run-pass
77
//
8-
//@ [chk_fail_pre] run-fail
9-
//@ [chk_fail_post] run-fail
8+
//@ [chk_fail_pre] run-crash
9+
//@ [chk_fail_post] run-crash
1010
//
1111
//@ [unchk_pass] compile-flags: -Zcontract-checks=no
1212
//@ [unchk_fail_pre] compile-flags: -Zcontract-checks=no

tests/ui/contracts/internal_machinery/contract-ast-extensions-tail.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
//@ [unchk_fail_post] run-pass
66
//@ [chk_pass] run-pass
77
//
8-
//@ [chk_fail_pre] run-fail
9-
//@ [chk_fail_post] run-fail
8+
//@ [chk_fail_pre] run-crash
9+
//@ [chk_fail_post] run-crash
1010
//
1111
//@ [unchk_pass] compile-flags: -Zcontract-checks=no
1212
//@ [unchk_fail_pre] compile-flags: -Zcontract-checks=no

tests/ui/contracts/internal_machinery/contract-intrinsics.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
//@ [default] run-pass
44
//@ [unchk_pass] run-pass
55
//@ [chk_pass] run-pass
6-
//@ [chk_fail_requires] run-fail
7-
//@ [chk_fail_ensures] run-fail
6+
//@ [chk_fail_requires] run-crash
7+
//@ [chk_fail_ensures] run-crash
88
//
99
//@ [unchk_pass] compile-flags: -Zcontract-checks=no
1010
//@ [chk_pass] compile-flags: -Zcontract-checks=yes

tests/ui/contracts/internal_machinery/contract-lang-items.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//@ [unchk_fail_post] run-pass
55
//@ [chk_pass] run-pass
66
//
7-
//@ [chk_fail_post] run-fail
7+
//@ [chk_fail_post] run-crash
88
//
99
//@ [unchk_pass] compile-flags: -Zcontract-checks=no
1010
//@ [unchk_fail_post] compile-flags: -Zcontract-checks=no

tests/ui/extern/extern-types-field-offset.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ run-fail
1+
//@ run-crash
22
//@ check-run-results
33
//@ exec-env:RUST_BACKTRACE=0
44
//@ normalize-stderr: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL"

tests/ui/mir/alignment/borrow_misaligned_field_projection.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ run-fail
1+
//@ run-crash
22
//@ ignore-i686-pc-windows-msvc: #112480
33
//@ compile-flags: -C debug-assertions
44
//@ error-pattern: misaligned pointer dereference: address must be a multiple of 0x4 but is

tests/ui/mir/alignment/misaligned_borrow.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ run-fail
1+
//@ run-crash
22
//@ ignore-i686-pc-windows-msvc: #112480
33
//@ compile-flags: -C debug-assertions
44
//@ error-pattern: misaligned pointer dereference: address must be a multiple of 0x4 but is

tests/ui/mir/alignment/misaligned_lhs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ run-fail
1+
//@ run-crash
22
//@ ignore-i686-pc-windows-msvc: #112480
33
//@ compile-flags: -C debug-assertions
44
//@ error-pattern: misaligned pointer dereference: address must be a multiple of 0x4 but is

tests/ui/mir/alignment/misaligned_mut_borrow.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ run-fail
1+
//@ run-crash
22
//@ ignore-i686-pc-windows-msvc: #112480
33
//@ compile-flags: -C debug-assertions
44
//@ error-pattern: misaligned pointer dereference: address must be a multiple of 0x4 but is

tests/ui/mir/alignment/misaligned_rhs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ run-fail
1+
//@ run-crash
22
//@ ignore-i686-pc-windows-msvc: #112480
33
//@ compile-flags: -C debug-assertions
44
//@ error-pattern: misaligned pointer dereference: address must be a multiple of 0x4 but is

tests/ui/mir/alignment/two_pointers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ run-fail
1+
//@ run-crash
22
//@ ignore-i686-pc-windows-msvc: #112480
33
//@ compile-flags: -C debug-assertions
44
//@ error-pattern: misaligned pointer dereference: address must be a multiple of 0x4 but is

tests/ui/mir/null/borrowed_mut_null.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ run-fail
1+
//@ run-crash
22
//@ compile-flags: -C debug-assertions
33
//@ error-pattern: null pointer dereference occurred
44

tests/ui/mir/null/borrowed_null.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ run-fail
1+
//@ run-crash
22
//@ compile-flags: -C debug-assertions
33
//@ error-pattern: null pointer dereference occurred
44

tests/ui/mir/null/borrowed_null_zst.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ run-fail
1+
//@ run-crash
22
//@ compile-flags: -C debug-assertions
33
//@ error-pattern: null pointer dereference occurred
44

tests/ui/mir/null/null_lhs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ run-fail
1+
//@ run-crash
22
//@ compile-flags: -C debug-assertions
33
//@ error-pattern: null pointer dereference occurred
44

tests/ui/mir/null/null_rhs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ run-fail
1+
//@ run-crash
22
//@ compile-flags: -C debug-assertions
33
//@ error-pattern: null pointer dereference occurred
44

tests/ui/mir/null/two_pointers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ run-fail
1+
//@ run-crash
22
//@ compile-flags: -C debug-assertions
33
//@ error-pattern: null pointer dereference occurred
44

tests/ui/panics/panic-in-cleanup.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ run-fail
1+
//@ run-crash
22
//@ exec-env:RUST_BACKTRACE=0
33
//@ check-run-results
44
//@ error-pattern: panic in a destructor during cleanup

tests/ui/panics/panic-in-ffi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ run-fail
1+
//@ run-crash
22
//@ exec-env:RUST_BACKTRACE=0
33
//@ check-run-results
44
//@ error-pattern: panic in a function that cannot unwind

tests/ui/panics/panic-in-message-fmt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Checks what happens when formatting the panic message panics.
22

3-
//@ run-fail
3+
//@ run-crash
44
//@ exec-env:RUST_BACKTRACE=0
55
//@ check-run-results
66
//@ error-pattern: panicked while processing panic

tests/ui/precondition-checks/alignment.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ run-fail
1+
//@ run-crash
22
//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
33
//@ error-pattern: unsafe precondition(s) violated: Alignment::new_unchecked requires
44

tests/ui/precondition-checks/ascii-char-digit_unchecked.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ run-fail
1+
//@ run-crash
22
//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
33
//@ error-pattern: unsafe precondition(s) violated: `ascii::Char::digit_unchecked` input cannot exceed 9
44

tests/ui/precondition-checks/assert_unchecked.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ run-fail
1+
//@ run-crash
22
//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
33
//@ error-pattern: unsafe precondition(s) violated: hint::assert_unchecked must never be called when the condition is false
44

tests/ui/precondition-checks/char-from_u32_unchecked.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ run-fail
1+
//@ run-crash
22
//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
33
//@ error-pattern: unsafe precondition(s) violated: invalid value for `char`
44

tests/ui/precondition-checks/copy-nonoverlapping.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ run-fail
1+
//@ run-crash
22
//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
33
//@ error-pattern: unsafe precondition(s) violated: ptr::copy_nonoverlapping requires
44
//@ revisions: null_src null_dst misaligned_src misaligned_dst overlapping

tests/ui/precondition-checks/copy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ run-fail
1+
//@ run-crash
22
//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
33
//@ error-pattern: unsafe precondition(s) violated: ptr::copy requires
44
//@ revisions: null_src null_dst misaligned_src misaligned_dst

tests/ui/precondition-checks/layout.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ run-fail
1+
//@ run-crash
22
//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
33
//@ error-pattern: unsafe precondition(s) violated: Layout::from_size_align_unchecked requires
44
//@ revisions: toolarge badalign

tests/ui/precondition-checks/nonnull.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ run-fail
1+
//@ run-crash
22
//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
33
//@ error-pattern: unsafe precondition(s) violated: NonNull::new_unchecked requires
44

0 commit comments

Comments
 (0)