Skip to content

Commit 2a2f01f

Browse files
committed
Auto merge of rust-lang#133460 - clubby789:run-fail-output, r=estebank
Use `check-run-results` for `run-fail` test stderr Fixes rust-lang#65865
2 parents 480eec0 + e1a9aff commit 2a2f01f

File tree

362 files changed

+873
-219
lines changed

Some content is hidden

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

362 files changed

+873
-219
lines changed

src/tools/tidy/src/ui_tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use ignore::Walk;
1717
const ENTRY_LIMIT: u32 = 901;
1818
// FIXME: The following limits should be reduced eventually.
1919

20-
const ISSUES_ENTRY_LIMIT: u32 = 1667;
20+
const ISSUES_ENTRY_LIMIT: u32 = 1679;
2121

2222
const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[
2323
"rs", // test source files

tests/ui/array-slice-vec/dst-raw-slice.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Test bounds checking for DST raw slices
22

33
//@ run-fail
4-
//@ error-pattern:index out of bounds
4+
//@ check-run-results:index out of bounds
55
//@ ignore-emscripten no processes
66

77
#[allow(unconditional_panic)]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
thread 'main' panicked at $DIR/dst-raw-slice.rs:11:18:
2+
index out of bounds: the len is 3 but the index is 3
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/ui/array-slice-vec/vec-overrun.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ run-fail
2-
//@ error-pattern:index out of bounds: the len is 1 but the index is 2
2+
//@ check-run-results:index out of bounds: the len is 1 but the index is 2
33
//@ ignore-emscripten no processes
44

55
fn main() {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
thread 'main' panicked at $DIR/vec-overrun.rs:11:17:
2+
index out of bounds: the len is 1 but the index is 2
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// be talking about `async fn`s instead.
33

44
//@ run-fail
5-
//@ error-pattern: thread 'main' panicked
6-
//@ error-pattern: `async fn` resumed after completion
5+
//@ check-run-results: thread 'main' panicked
6+
//@ check-run-results: `async fn` resumed after completion
77
//@ edition:2018
88

99
#![feature(coroutines, coroutine_trait)]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
thread 'main' panicked at $DIR/issue-65419-async-fn-resume-after-completion.rs:11:16:
2+
`async fn` resumed after completion
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
//@ run-fail
55
//@ needs-unwind
6-
//@ error-pattern: thread 'main' panicked
7-
//@ error-pattern: `async fn` resumed after panicking
6+
//@ check-run-results: thread 'main' panicked
7+
//@ check-run-results: `async fn` resumed after panicking
88
//@ edition:2018
99

1010
#![feature(coroutines, coroutine_trait)]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
thread 'main' panicked at $DIR/issue-65419-async-fn-resume-after-panic.rs:15:5:
2+
explicit panic
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
4+
thread 'main' panicked at $DIR/issue-65419-async-fn-resume-after-panic.rs:14:16:
5+
`async fn` resumed after panicking

tests/ui/async-await/issues/issue-65419/issue-65419-coroutine-resume-after-completion.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// panic when resumed after completion.
44

55
//@ run-fail
6-
//@ error-pattern:coroutine resumed after completion
6+
//@ check-run-results:coroutine resumed after completion
77
//@ edition:2018
88

99
#![feature(coroutines, coroutine_trait, stmt_expr_attributes)]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
thread 'main' panicked at $DIR/issue-65419-coroutine-resume-after-completion.rs:15:5:
2+
coroutine resumed after completion
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/ui/binop/binop-fail-3.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ run-fail
2-
//@ error-pattern:quux
2+
//@ check-run-results:quux
33
//@ ignore-emscripten no processes
44

55
fn foo() -> ! {
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
thread 'main' panicked at $DIR/binop-fail-3.rs:6:5:
2+
quux
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/ui/binop/binop-panic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ run-fail
2-
//@ error-pattern:quux
2+
//@ check-run-results:quux
33
//@ ignore-emscripten no processes
44

55
fn my_err(s: String) -> ! {

tests/ui/binop/binop-panic.run.stderr

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
thread 'main' panicked at $DIR/binop-panic.rs:7:5:
2+
quux
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/ui/binop/binop-panic.run.stdout

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bye

tests/ui/borrowck/borrowck-local-borrow.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ run-fail
2-
//@ error-pattern:panic 1
2+
//@ check-run-results:panic 1
33
//@ ignore-emscripten no processes
44

55
fn main() {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
thread 'main' panicked at $DIR/borrowck-local-borrow.rs:8:5:
2+
panic 1
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/ui/borrowck/issue-28934.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// which were not being considered during the contraction phase.
33

44
//@ run-fail
5-
//@ error-pattern:explicit panic
5+
//@ check-run-results:explicit panic
66
//@ ignore-emscripten no processes
77

88
struct Parser<'i: 't, 't>(&'i u8, &'t u8);
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
thread 'main' panicked at $DIR/issue-28934.rs:14:9:
2+
explicit panic
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/ui/closures/diverging-closure.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ run-fail
2-
//@ error-pattern:oops
2+
//@ check-run-results:oops
33
//@ ignore-emscripten no processes
44

55
fn main() {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
thread 'main' panicked at $DIR/diverging-closure.rs:7:9:
2+
oops
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/ui/consts/issue-29798.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ run-fail
2-
//@ error-pattern:index out of bounds: the len is 5 but the index is 5
2+
//@ check-run-results:index out of bounds: the len is 5 but the index is 5
33
//@ ignore-emscripten no processes
44

55
const fn test(x: usize) -> i32 {
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
thread 'main' panicked at $DIR/issue-29798.rs:6:5:
2+
index out of bounds: the len is 5 but the index is 5
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/ui/coroutine/coroutine-resume-after-panic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@ run-fail
22
//@ needs-unwind
3-
//@ error-pattern:coroutine resumed after panicking
3+
//@ check-run-results:coroutine resumed after panicking
44
//@ ignore-emscripten no processes
55

66
// Test that we get the correct message for resuming a panicked coroutine.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
thread 'main' panicked at $DIR/coroutine-resume-after-panic.rs:18:9:
2+
explicit panic
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
4+
thread 'main' panicked at $DIR/coroutine-resume-after-panic.rs:17:30:
5+
coroutine resumed after panicking

tests/ui/expr/if/expr-if-panic-fn.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ run-fail
2-
//@ error-pattern:explicit panic
2+
//@ check-run-results:explicit panic
33
//@ ignore-emscripten no processes
44

55
fn f() -> ! {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
thread 'main' panicked at $DIR/expr-if-panic-fn.rs:6:5:
2+
explicit panic
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/ui/expr/if/expr-if-panic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ run-fail
2-
//@ error-pattern:explicit panic
2+
//@ check-run-results:explicit panic
33
//@ ignore-emscripten no processes
44

55
fn main() {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
thread 'main' panicked at $DIR/expr-if-panic.rs:9:9:
2+
explicit panic
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/ui/expr/if/if-check-panic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ run-fail
2-
//@ error-pattern:Number is odd
2+
//@ check-run-results:Number is odd
33
//@ ignore-emscripten no processes
44

55
fn even(x: usize) -> bool {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
thread 'main' panicked at $DIR/if-check-panic.rs:19:9:
2+
Number is odd
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/ui/expr/if/if-cond-bot.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ run-fail
2-
//@ error-pattern:quux
2+
//@ check-run-results:quux
33
//@ ignore-emscripten no processes
44

55
fn my_err(s: String) -> ! {
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
thread 'main' panicked at $DIR/if-cond-bot.rs:7:5:
2+
quux
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bye

tests/ui/extern/issue-18576.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ run-fail
2-
//@ error-pattern:stop
2+
//@ check-run-results:stop
33
//@ ignore-emscripten no processes
44

55
// #18576
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
thread 'main' panicked at $DIR/issue-18576.rs:11:5:
2+
stop
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/ui/fn/expr-fn-panic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ run-fail
2-
//@ error-pattern:explicit panic
2+
//@ check-run-results:explicit panic
33
//@ ignore-emscripten no processes
44

55
fn f() -> ! {

tests/ui/fn/expr-fn-panic.run.stderr

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
thread 'main' panicked at $DIR/expr-fn-panic.rs:6:5:
2+
explicit panic
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/ui/hashmap/hashmap-capacity-overflow.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//@ run-fail
22
//@ error-pattern:capacity overflow
33
//@ ignore-emscripten no processes
4+
//@ compile-flags: --remap-path-prefix={{rust-src-base}}=remapped
45

56
use std::collections::hash_map::HashMap;
67
use std::mem::size_of;

tests/ui/imports/glob-use-std.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Issue #7580
22

33
//@ run-fail
4-
//@ error-pattern:panic works
4+
//@ check-run-results:panic works
55
//@ ignore-emscripten no processes
66

77
use std::*;
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
thread 'main' panicked at $DIR/glob-use-std.rs:10:5:
2+
panic works
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/ui/issues/issue-12920.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ run-fail
2-
//@ error-pattern:explicit panic
2+
//@ check-run-results:explicit panic
33
//@ ignore-emscripten no processes
44

55
pub fn main() {
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
thread 'main' panicked at $DIR/issue-12920.rs:6:5:
2+
explicit panic
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/ui/issues/issue-13202.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ run-fail
2-
//@ error-pattern:bad input
2+
//@ check-run-results:bad input
33
//@ ignore-emscripten no processes
44

55
fn main() {
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
thread 'main' panicked at $DIR/issue-13202.rs:6:27:
2+
bad input
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/ui/issues/issue-20971.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Regression test for Issue #20971.
22

33
//@ run-fail
4-
//@ error-pattern:Hello, world!
4+
//@ check-run-results:Hello, world!
55
//@ ignore-emscripten no processes
66

77
pub trait Parser {
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
thread 'main' panicked at $DIR/issue-20971.rs:18:5:
2+
Hello, world!
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/ui/issues/issue-23354-2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ run-fail
2-
//@ error-pattern:panic evaluated
2+
//@ check-run-results:panic evaluated
33
//@ ignore-emscripten no processes
44

55
#[allow(unused_variables)]
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
thread 'main' panicked at $DIR/issue-23354-2.rs:8:14:
2+
panic evaluated
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/ui/issues/issue-23354.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ run-fail
2-
//@ error-pattern:panic evaluated
2+
//@ check-run-results:panic evaluated
33
//@ ignore-emscripten no processes
44

55
#[allow(unused_variables)]
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
thread 'main' panicked at $DIR/issue-23354.rs:7:14:
2+
panic evaluated
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/ui/issues/issue-2761.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ run-fail
2-
//@ error-pattern:custom message
2+
//@ check-run-results:custom message
33
//@ ignore-emscripten no processes
44

55
fn main() {

tests/ui/issues/issue-2761.run.stderr

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
thread 'main' panicked at $DIR/issue-2761.rs:6:5:
2+
custom message
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/ui/issues/issue-3029.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ run-fail
2-
//@ error-pattern:so long
2+
//@ check-run-results:so long
33
//@ ignore-emscripten no processes
44

55
#![allow(unreachable_code)]

tests/ui/issues/issue-3029.run.stderr

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
thread 'main' panicked at $DIR/issue-3029.rs:10:5:
2+
so long
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/ui/issues/issue-30380.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// destroyed values lying around for other destructors to observe.
33

44
//@ run-fail
5-
//@ error-pattern:panicking destructors ftw!
5+
//@ check-run-results:panicking destructors ftw!
66
//@ ignore-emscripten no processes
77

88
struct Observer<'a>(&'a mut FilledOnDrop);
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
thread 'main' panicked at $DIR/issue-30380.rs:17:13:
2+
panicking destructors ftw!
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/ui/issues/issue-44216-add-instant.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ run-fail
2-
//@ error-pattern:overflow
2+
//@ check-run-results:overflow
33

44
use std::time::{Duration, Instant};
55

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
thread 'main' panicked at library/std/src/time.rs:417:33:
2+
overflow when adding duration to instant
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/ui/issues/issue-44216-add-system-time.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ run-fail
2-
//@ error-pattern:overflow
2+
//@ check-run-results:overflow
33
//@ ignore-emscripten no processes
44

55
use std::time::{Duration, SystemTime};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
thread 'main' panicked at library/std/src/time.rs:601:31:
2+
overflow when adding duration to instant
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/ui/issues/issue-44216-sub-instant.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ run-fail
2-
//@ error-pattern:overflow
2+
//@ check-run-results:overflow
33
//@ ignore-emscripten no processes
44

55
use std::time::{Instant, Duration};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
thread 'main' panicked at library/std/src/time.rs:433:33:
2+
overflow when subtracting duration from instant
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/ui/issues/issue-44216-sub-system-time.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ run-fail
2-
//@ error-pattern:overflow
2+
//@ check-run-results:overflow
33
//@ ignore-emscripten no processes
44

55
use std::time::{Duration, SystemTime};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
thread 'main' panicked at library/std/src/time.rs:617:31:
2+
overflow when subtracting duration from instant
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/ui/loops/for-each-loop-panic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ run-fail
2-
//@ error-pattern:moop
2+
//@ check-run-results:moop
33
//@ ignore-emscripten no processes
44

55
fn main() {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
thread 'main' panicked at $DIR/for-each-loop-panic.rs:7:9:
2+
moop
3+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

0 commit comments

Comments
 (0)