Skip to content

Commit 1cdc81b

Browse files
committed
Don't pass -Z unstable-options by default for UI tests
- Pass it explicitly where appropriate - Update stderr files and warnings; it turns that unstable-options has far-reaching effects on diagnostics.
1 parent 34b9932 commit 1cdc81b

File tree

67 files changed

+86
-817
lines changed

Some content is hidden

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

67 files changed

+86
-817
lines changed

src/bootstrap/test.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,6 @@ note: if you're sure you want to do this, please open an issue as to why. In the
12801280
}
12811281
}
12821282
flags.push(format!("-Cdebuginfo={}", builder.config.rust_debuginfo_level_tests));
1283-
flags.push("-Zunstable-options".to_string());
12841283
flags.push(builder.config.cmd.rustc_args().join(" "));
12851284

12861285
if let Some(linker) = builder.linker(target) {

src/test/rustdoc-ui/run-directory.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
// revisions: correct incorrect
44
// check-pass
5-
// [correct]compile-flags:--test --test-run-directory={{src-base}}
6-
// [incorrect]compile-flags:--test --test-run-directory={{src-base}}/coverage
5+
// [correct]compile-flags:--test --test-run-directory={{src-base}} -Zunstable-options
6+
// [incorrect]compile-flags:--test --test-run-directory={{src-base}}/coverage -Zunstable-options
77
// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR"
88
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
99

src/test/ui-fulldeps/internal-lints/pass_ty_by_ref_self.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// compile-flags: -Z unstable-options
12
// NOTE: This test doesn't actually require `fulldeps`
23
// so we could instead use it as an `ui` test.
34
//

src/test/ui-fulldeps/internal-lints/pass_ty_by_ref_self.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
error: passing `TyCtxt<'tcx>` by reference
2-
--> $DIR/pass_ty_by_ref_self.rs:17:15
2+
--> $DIR/pass_ty_by_ref_self.rs:18:15
33
|
44
LL | fn by_ref(&self) {}
55
| ^^^^^ help: try passing by value: `TyCtxt<'tcx>`
66
|
77
note: the lint level is defined here
8-
--> $DIR/pass_ty_by_ref_self.rs:7:9
8+
--> $DIR/pass_ty_by_ref_self.rs:8:9
99
|
1010
LL | #![deny(rustc::ty_pass_by_reference)]
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
1212

1313
error: passing `Ty<'tcx>` by reference
14-
--> $DIR/pass_ty_by_ref_self.rs:30:21
14+
--> $DIR/pass_ty_by_ref_self.rs:31:21
1515
|
1616
LL | fn by_ref(self: &Ty<'tcx>) {}
1717
| ^^^^^^^^^ help: try passing by value: `Ty<'tcx>`

src/test/ui/annotate-snippet/missing-type.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: --error-format human-annotate-rs
1+
// compile-flags: --error-format human-annotate-rs -Z unstable-options
22

33
pub fn main() {
44
let x: Iter; //~ ERROR cannot find type `Iter` in this scope

src/test/ui/annotate-snippet/multispan.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// aux-build:multispan.rs
2-
// compile-flags: --error-format human-annotate-rs
2+
// compile-flags: --error-format human-annotate-rs -Z unstable-options
33

44
#![feature(proc_macro_hygiene)]
55

src/test/ui/deduplicate-diagnostics.duplicate.stderr

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@ error[E0452]: malformed lint attribute input
2222
LL | #[deny("literal")]
2323
| ^^^^^^^^^ bad attribute argument
2424

25-
error[E0452]: malformed lint attribute input
26-
--> $DIR/deduplicate-diagnostics.rs:8:8
27-
|
28-
LL | #[deny("literal")]
29-
| ^^^^^^^^^ bad attribute argument
30-
31-
error: aborting due to 5 previous errors
25+
error: aborting due to 4 previous errors
3226

3327
For more information about this error, try `rustc --explain E0452`.

src/test/ui/deduplicate-diagnostics.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,4 @@ struct S;
77

88
#[deny("literal")] //~ ERROR malformed lint attribute input
99
//[duplicate]~| ERROR malformed lint attribute input
10-
//[duplicate]~| ERROR malformed lint attribute input
1110
fn main() {}

src/test/ui/error-codes/E0452.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,5 @@
22
//~| ERROR E0452
33
//~| ERROR E0452
44
//~| ERROR E0452
5-
//~| ERROR E0452
6-
//~| ERROR E0452
75
fn main() {
86
}

src/test/ui/error-codes/E0452.stderr

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,6 @@ error[E0452]: malformed lint attribute input
2222
LL | #![allow(foo = "")]
2323
| ^^^^^^^^ bad attribute argument
2424

25-
error[E0452]: malformed lint attribute input
26-
--> $DIR/E0452.rs:1:10
27-
|
28-
LL | #![allow(foo = "")]
29-
| ^^^^^^^^ bad attribute argument
30-
31-
error[E0452]: malformed lint attribute input
32-
--> $DIR/E0452.rs:1:10
33-
|
34-
LL | #![allow(foo = "")]
35-
| ^^^^^^^^ bad attribute argument
36-
37-
error: aborting due to 6 previous errors
25+
error: aborting due to 4 previous errors
3826

3927
For more information about this error, try `rustc --explain E0452`.

0 commit comments

Comments
 (0)