-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Selectively replace instances of error-pattern
with check-run-results
#143537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//@ run-fail | ||
//@ error-pattern:quux | ||
//@ check-run-results | ||
//@ needs-subprocess | ||
|
||
fn foo() -> ! { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//@ run-fail | ||
//@ error-pattern:quux | ||
//@ check-run-results | ||
//@ needs-subprocess | ||
|
||
fn my_err(s: String) -> ! { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//@ run-fail | ||
//@ error-pattern:panic 1 | ||
//@ check-run-results | ||
//@ needs-subprocess | ||
|
||
fn main() { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//@ run-fail | ||
//@ error-pattern:oops | ||
//@ check-run-results | ||
//@ needs-subprocess | ||
|
||
fn main() { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
//@ [remapped-self] remap-src-base | ||
|
||
// Verify that the expected source code is shown. | ||
//@ error-pattern: pub struct SomeStruct {} // This line should be show | ||
Comment on lines
8
to
-9
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remark: for tests like this, I believe it's intentional that we do not snapshot exact run output, because the exact paths themselves are not important but rather it's
|
||
//@ check-run-results | ||
|
||
extern crate remapped_dep; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// FLUFFY | ||
//@ run-pass | ||
|
||
fn f(arg: &mut A) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//@ run-fail | ||
//@ error-pattern:explicit panic | ||
//@ check-run-results | ||
//@ needs-subprocess | ||
|
||
fn f() -> ! { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//@ run-fail | ||
//@ error-pattern:explicit panic | ||
//@ check-run-results | ||
//@ needs-subprocess | ||
|
||
fn main() { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//@ run-fail | ||
//@ error-pattern:quux | ||
//@ check-run-results | ||
//@ needs-subprocess | ||
|
||
fn my_err(s: String) -> ! { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//@ run-fail | ||
//@ error-pattern:stop | ||
//@ check-run-results | ||
//@ needs-subprocess | ||
|
||
// #18576 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//@ run-fail | ||
//@ error-pattern:explicit panic | ||
//@ check-run-results | ||
//@ needs-subprocess | ||
|
||
fn f() -> ! { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//@ run-fail | ||
//@ error-pattern:explicit panic | ||
//@ check-run-results | ||
//@ needs-subprocess | ||
|
||
pub fn main() { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//@ run-fail | ||
//@ error-pattern:bad input | ||
//@ check-run-results | ||
//@ needs-subprocess | ||
|
||
fn main() { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//@ run-fail | ||
//@ error-pattern:index out of bounds | ||
//@ check-run-results | ||
//@ needs-subprocess | ||
|
||
use std::mem; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//@ run-fail | ||
//@ error-pattern:custom message | ||
//@ check-run-results | ||
//@ needs-subprocess | ||
|
||
fn main() { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//@ run-fail | ||
//@ error-pattern:so long | ||
//@ check-run-results | ||
//@ needs-subprocess | ||
|
||
#![allow(unreachable_code)] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//@ run-fail | ||
//@ error-pattern:overflow | ||
//@ check-run-results | ||
|
||
use std::time::{Duration, Instant}; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//@ run-fail | ||
//@ error-pattern:moop | ||
//@ check-run-results | ||
//@ needs-subprocess | ||
|
||
fn main() { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//@ run-fail | ||
//@ error-pattern:assertion failed: 1 == 2 | ||
//@ check-run-results | ||
//@ needs-subprocess | ||
|
||
fn main() { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//@ run-fail | ||
//@ error-pattern:assertion failed: false | ||
//@ check-run-results | ||
//@ needs-subprocess | ||
|
||
fn main() { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
//@ run-fail | ||
//@ error-pattern:assertion `left matches right` failed: 1 + 1 definitely should be 3 | ||
//@ error-pattern: left: 2 | ||
//@ error-pattern: right: 3 | ||
Comment on lines
-2
to
-4
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remark: for example, I believe this intentionally does not try to capture full run output, because the exact panic does not matter, and only the core substrings do matter. |
||
//@ check-run-results | ||
//@ needs-subprocess | ||
|
||
#![feature(assert_matches)] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//@ aux-build: borrowck-error-in-macro.rs | ||
//@ error-pattern: a call in this macro requires a mutable binding due to mutable borrow of `d` | ||
//@ check-run-results | ||
//FIXME: remove error-pattern (see #141896) | ||
Comment on lines
-2
to
3
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remark: I want to say this can be
but I think |
||
|
||
extern crate borrowck_error_in_macro as a; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//@ run-fail | ||
//@ error-pattern:test | ||
//@ check-run-results | ||
//@ needs-subprocess | ||
|
||
fn main() { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//@ run-fail | ||
//@ error-pattern:test | ||
//@ check-run-results | ||
//@ needs-subprocess | ||
|
||
fn main() { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remark: More concretely, I think we cannot attempt to capture run-time panic output, because the backtrace mechanism, std line numbers of underlying panic impls / macros, etc. can change between targets and is prone to breaking.