forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#41968 - kennytm:fix-unreadable-json-test-ou…
…tput-36516, r=nikomatsakis Introduce 'run-pass' header to 'ui' tests in compiletest. Fix issue rust-lang#36516. <del>`ui-run` test is a combination of `ui` test and `run-pass` test. It is used to test lint output.</del> Added support of `// run-pass` header to `ui` tests. The compiler message of each test must match the corresponding `*.stderr` file like the traditional `ui` tests. Additionally, the compiled output must be executed successfully like the `run-pass` test. 12 `run-pass`/`run-pass-fulldeps` tests are moved to `ui`/`ui-fulldeps` plus the headers. After this move, no `run-pass`/`run-pass-fulldeps` tests should rely on the compiler's JSON message. This allows us to stop passing `--error-format json` in run-pass tests, thus fixing rust-lang#36516.
- Loading branch information
Showing
30 changed files
with
246 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
warning: derive(Encodable) is deprecated in favor of derive(RustcEncodable) | ||
--> $DIR/deprecated-derive.rs:18:10 | ||
| | ||
18 | #[derive(Encodable)] | ||
| ^^^^^^^^^ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
warning: item is named 'lintme' | ||
--> $DIR/lint-group-plugin.rs:18:1 | ||
| | ||
18 | fn lintme() { } //~ WARNING item is named 'lintme' | ||
| ^^^^^^^^^^^^^^^ | ||
| | ||
= note: #[warn(test_lint)] on by default | ||
|
||
warning: item is named 'pleaselintme' | ||
--> $DIR/lint-group-plugin.rs:19:1 | ||
| | ||
19 | fn pleaselintme() { } //~ WARNING item is named 'pleaselintme' | ||
| ^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: #[warn(please_lint)] on by default | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
warning: function is never used: `lintme` | ||
--> $DIR/lint-plugin-cmdline-allow.rs:19:1 | ||
| | ||
19 | fn lintme() { } | ||
| ^^^^^^^^^^^^^^^ | ||
| | ||
= note: #[warn(dead_code)] on by default | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
warning: item is named 'lintme' | ||
--> $DIR/lint-plugin-cmdline-load.rs:18:1 | ||
| | ||
18 | fn lintme() { } //~ WARNING item is named 'lintme' | ||
| ^^^^^^^^^^^^^^^ | ||
| | ||
= note: #[warn(test_lint)] on by default | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
warning: item is named 'lintme' | ||
--> $DIR/lint-plugin.rs:18:1 | ||
| | ||
18 | fn lintme() { } //~ WARNING item is named 'lintme' | ||
| ^^^^^^^^^^^^^^^ | ||
| | ||
= note: #[warn(test_lint)] on by default | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
warning: macro_escape is a deprecated synonym for macro_use | ||
--> $DIR/deprecated-macro_escape-inner.rs:14:5 | ||
| | ||
14 | #![macro_escape] //~ WARNING macro_escape is a deprecated synonym for macro_use | ||
| ^^^^^^^^^^^^^^^^ | ||
| | ||
= help: consider an outer attribute, #[macro_use] mod ... | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
warning: macro_escape is a deprecated synonym for macro_use | ||
--> $DIR/deprecated-macro_escape.rs:13:1 | ||
| | ||
13 | #[macro_escape] //~ WARNING macro_escape is a deprecated synonym for macro_use | ||
| ^^^^^^^^^^^^^^^ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
warning: empty trait list in `derive` | ||
--> $DIR/deriving-meta-empty-trait-list.rs:15:1 | ||
| | ||
15 | #[derive] //~ WARNING empty trait list in `derive` | ||
| ^^^^^^^^^ | ||
|
||
warning: empty trait list in `derive` | ||
--> $DIR/deriving-meta-empty-trait-list.rs:18:1 | ||
| | ||
18 | #[derive()] //~ WARNING empty trait list in `derive` | ||
| ^^^^^^^^^^^ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
warning: enum variant is more than three times larger (32 bytes) than the next largest | ||
--> $DIR/enum-size-variance.rs:28:5 | ||
| | ||
28 | L(isize, isize, isize, isize), //~ WARNING three times larger | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
note: lint level defined here | ||
--> $DIR/enum-size-variance.rs:13:9 | ||
| | ||
13 | #![warn(variant_size_differences)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
warning[E0170]: pattern binding `Bar` is named the same as one of the variants of the type `Foo` | ||
--> $DIR/issue-19100.rs:27:1 | ||
| | ||
27 | Bar if true | ||
| ^^^ | ||
| | ||
= help: if you meant to match on a variant, consider making the path in the pattern qualified: `Foo::Bar` | ||
|
||
warning[E0170]: pattern binding `Baz` is named the same as one of the variants of the type `Foo` | ||
--> $DIR/issue-19100.rs:32:1 | ||
| | ||
32 | Baz if false | ||
| ^^^ | ||
| | ||
= help: if you meant to match on a variant, consider making the path in the pattern qualified: `Foo::Baz` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
warning: unnecessary parentheses around `return` value | ||
--> $DIR/path-lookahead.rs:16:10 | ||
| | ||
16 | return (<T as ToString>::to_string(&arg)); //~WARN unnecessary parentheses around `return` value | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: #[warn(unused_parens)] on by default | ||
|
||
warning: function is never used: `with_parens` | ||
--> $DIR/path-lookahead.rs:15:1 | ||
| | ||
15 | / fn with_parens<T: ToString>(arg: T) -> String { //~WARN function is never used: `with_parens` | ||
16 | | return (<T as ToString>::to_string(&arg)); //~WARN unnecessary parentheses around `return` value | ||
17 | | } | ||
| |_^ | ||
| | ||
= note: #[warn(dead_code)] on by default | ||
|
||
warning: function is never used: `no_parens` | ||
--> $DIR/path-lookahead.rs:19:1 | ||
| | ||
19 | / fn no_parens<T: ToString>(arg: T) -> String { //~WARN function is never used: `no_parens` | ||
20 | | return <T as ToString>::to_string(&arg); | ||
21 | | } | ||
| |_^ | ||
| | ||
= note: #[warn(dead_code)] on by default | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
warning: attribute must be of the form: `#[should_panic]` or `#[should_panic(expected = "error message")]` | ||
--> $DIR/test-should-panic-attr.rs:15:1 | ||
| | ||
15 | #[should_panic = "foo"] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: Errors in this attribute were erroneously allowed and will become a hard error in a future release. | ||
|
||
warning: argument must be of the form: `expected = "error message"` | ||
--> $DIR/test-should-panic-attr.rs:22:1 | ||
| | ||
22 | #[should_panic(expected)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: Errors in this attribute were erroneously allowed and will become a hard error in a future release. | ||
|
||
warning: argument must be of the form: `expected = "error message"` | ||
--> $DIR/test-should-panic-attr.rs:29:1 | ||
| | ||
29 | #[should_panic(expect)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: Errors in this attribute were erroneously allowed and will become a hard error in a future release. | ||
|
||
warning: argument must be of the form: `expected = "error message"` | ||
--> $DIR/test-should-panic-attr.rs:36:1 | ||
| | ||
36 | #[should_panic(expected(foo, bar))] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: Errors in this attribute were erroneously allowed and will become a hard error in a future release. | ||
|
||
warning: argument must be of the form: `expected = "error message"` | ||
--> $DIR/test-should-panic-attr.rs:43:1 | ||
| | ||
43 | #[should_panic(expected = "foo", bar)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: Errors in this attribute were erroneously allowed and will become a hard error in a future release. | ||
|
Oops, something went wrong.