Skip to content

Commit 33245fe

Browse files
committed
Auto merge of #46640 - tommyip:ui_tests, r=estebank
Enforce successful ui tests to have must-compile-successfully flag. r? @nikomatsakis cc @oli-obk Fixes #46587
2 parents 5f3bd73 + 2ad5bf0 commit 33245fe

Some content is hidden

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

51 files changed

+253
-203
lines changed

src/test/ui/check_match/issue-43253.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// must-compile-successfully
12+
1113
#![feature(exclusive_range_pattern)]
1214
#![warn(unreachable_patterns)]
1315

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
warning: unreachable pattern
2-
--> $DIR/issue-43253.rs:37:9
2+
--> $DIR/issue-43253.rs:39:9
33
|
4-
37 | 9 => {},
4+
39 | 9 => {},
55
| ^
66
|
77
note: lint level defined here
8-
--> $DIR/issue-43253.rs:12:9
8+
--> $DIR/issue-43253.rs:14:9
99
|
10-
12 | #![warn(unreachable_patterns)]
10+
14 | #![warn(unreachable_patterns)]
1111
| ^^^^^^^^^^^^^^^^^^^^
1212

1313
warning: unreachable pattern
14-
--> $DIR/issue-43253.rs:43:9
14+
--> $DIR/issue-43253.rs:45:9
1515
|
16-
43 | 8...9 => {},
16+
45 | 8...9 => {},
1717
| ^^^^^
1818

1919
warning: unreachable pattern
20-
--> $DIR/issue-43253.rs:49:9
20+
--> $DIR/issue-43253.rs:51:9
2121
|
22-
49 | 9...9 => {},
22+
51 | 9...9 => {},
2323
| ^^^^^
2424

src/test/ui/codemap_tests/unicode_3.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// must-compile-successfully
12+
1113
fn main() {
1214
let s = "ZͨA͑ͦ͒͋ͤ͑̚L̄͑͋Ĝͨͥ̿͒̽̈́Oͥ͛ͭ!̏"; while true { break; }
1315
println!("{}", s);

src/test/ui/codemap_tests/unicode_3.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
warning: denote infinite loops with `loop { ... }`
2-
--> $DIR/unicode_3.rs:12:45
2+
--> $DIR/unicode_3.rs:14:45
33
|
4-
12 | let s = "ZͨA͑ͦ͒͋ͤ͑̚L̄͑͋Ĝͨͥ̿͒̽̈́Oͥ͛ͭ!̏"; while true { break; }
4+
14 | let s = "ZͨA͑ͦ͒͋ͤ͑̚L̄͑͋Ĝͨͥ̿͒̽̈́Oͥ͛ͭ!̏"; while true { break; }
55
| ----------^^^^^^^^^^^
66
| |
77
| help: use `loop`

src/test/ui/explain.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@
99
// except according to those terms.
1010

1111
// compile-flags: --explain E0591
12+
// must-compile-successfully

src/test/ui/hello_world/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// must-compile-successfully
12+
1113
// Test that compiling hello world succeeds with no output of any kind.
1214

1315
fn main() {

src/test/ui/lint/command-line-lint-group-allow.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
// compile-flags: -A bad-style
12+
// must-compile-successfully
1213

1314
fn main() {
1415
let _InappropriateCamelCasing = true;

src/test/ui/lint/command-line-lint-group-warn.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
// compile-flags: -W bad-style
12+
// must-compile-successfully
1213

1314
fn main() {
1415
let _InappropriateCamelCasing = true;

src/test/ui/lint/command-line-lint-group-warn.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
warning: variable `_InappropriateCamelCasing` should have a snake case name such as `_inappropriate_camel_casing`
2-
--> $DIR/command-line-lint-group-warn.rs:14:9
2+
--> $DIR/command-line-lint-group-warn.rs:15:9
33
|
4-
14 | let _InappropriateCamelCasing = true;
4+
15 | let _InappropriateCamelCasing = true;
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
77
= note: `-W non-snake-case` implied by `-W bad-style`

src/test/ui/lint/not_found.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// must-compile-successfully
12+
1113
// this tests the `unknown_lint` lint, especially the suggestions
1214

1315
// the suggestion only appears if a lint with the lowercase name exists

0 commit comments

Comments
 (0)