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.
Introduce 'run-pass' header to 'ui' tests in compiletest. Fix issue r…
…ust-lang#36516. The 'run-pass' header cause a 'ui' test to execute the result. It is used to test the lint output, at the same time ensure those lints won't cause the source code to become compile-fail. 12 run-pass/run-pass-fulldeps tests gained the header and are moved to ui/ui-fulldeps. 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
28 changed files
with
216 additions
and
5 deletions.
There are no files selected for viewing
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:32:5 | ||
| | ||
32 | L(isize, isize, isize, isize), //~ WARNING three times larger | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
note: lint level defined here | ||
--> $DIR/enum-size-variance.rs:17:9 | ||
| | ||
17 | #![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. | ||
|
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