Skip to content

Commit 4916d44

Browse files
committed
Fix up tests on wasm and msvc, and rebase conflicts
Can be fixed properly later by adding a new flag for non-exhaustive line annotation checking
1 parent 4d64990 commit 4916d44

7 files changed

+35
-13
lines changed

Diff for: tests/ui/cfg/cfg_false_no_std-2.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// Error, the linked empty library is `no_std` and doesn't provide a panic handler.
22

3+
//@ compile-flags: --error-format=human
4+
//@ error-pattern: `#[panic_handler]` function required, but not found
35
//@ dont-check-compiler-stderr
46
//@ aux-build: cfg_false_lib_no_std_before.rs
57

@@ -9,5 +11,6 @@ extern crate cfg_false_lib_no_std_before as _;
911

1012
fn main() {}
1113

12-
//~? ERROR `#[panic_handler]` function required, but not found
13-
//~? ERROR unwinding panics are not supported without std
14+
// FIXME: The second error is target-dependent.
15+
//FIXME~? ERROR `#[panic_handler]` function required, but not found
16+
//FIXME~? ERROR unwinding panics are not supported without std

Diff for: tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
//~ ERROR values of the type `[u8; usize::MAX]` are too big for the target architecture
1+
//FIXME~ ERROR values of the type `[u8; usize::MAX]` are too big for the target architecture
22
// Make sure the compiler does not ICE when trying to generate the debuginfo name of a type that
33
// causes a layout error.
44
// This version of the test already ICE'd before the commit that introduce the ICE described in
55
// https://github.com/rust-lang/rust/issues/94961.
66

7-
//@ compile-flags:-C debuginfo=2
7+
//@ compile-flags:-C debuginfo=2 --error-format=human
88
//@ build-fail
9+
//@ error-pattern: values of the type `[u8; usize::MAX]` are too big for the target architecture
910

1011
#![crate_type = "rlib"]
1112

@@ -16,3 +17,6 @@ pub enum Foo<T> {
1617
pub fn foo() -> usize {
1718
std::mem::size_of::<Foo<u8>>()
1819
}
20+
21+
// FIXME: the error is reported on different lines on different targets
22+
//FIXME~? ERROR values of the type `[u8; usize::MAX]` are too big for the target architecture

Diff for: tests/ui/panic-runtime/two-panic-runtimes.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
// ignore-tidy-linelength
12
//@ build-fail
3+
//@ compile-flags: --error-format=human
4+
//@ error-pattern: cannot link together two panic runtimes: panic_runtime_unwind and panic_runtime_unwind2
25
//@ dont-check-compiler-stderr
36
//@ aux-build:panic-runtime-unwind.rs
47
//@ aux-build:panic-runtime-unwind2.rs
@@ -13,4 +16,7 @@ extern crate panic_runtime_lang_items;
1316

1417
fn main() {}
1518

16-
//~? ERROR cannot link together two panic runtimes: panic_runtime_unwind and panic_runtime_unwind2
19+
// FIXME: The second and third errors are target-dependent.
20+
//FIXME~? ERROR cannot link together two panic runtimes: panic_runtime_unwind and panic_runtime_unwind2
21+
//FIXME~? ERROR the linked panic runtime `panic_runtime_unwind2` is not compiled with this crate's panic strategy `abort`
22+
//FIXME~? ERROR the crate `panic_runtime_unwind` requires panic strategy `unwind` which is incompatible with this crate's strategy of `abort`

Diff for: tests/ui/panic-runtime/unwind-tables-target-required.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
//@ compile-flags: -C force-unwind-tables=no
66
//
77
//@ dont-check-compiler-stderr
8-
//@ error-pattern: target requires unwind tables, they cannot be disabled with `-C force-unwind-tables=no`
98

109
pub fn main() {
1110
}
11+
12+
//~? ERROR target requires unwind tables, they cannot be disabled with `-C force-unwind-tables=no`

Diff for: tests/ui/panic-runtime/want-abort-got-unwind.rs

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
// ignore-tidy-linelength
12
//@ build-fail
3+
//@ compile-flags: --error-format=human
4+
//@ error-pattern: the linked panic runtime `panic_runtime_unwind` is not compiled with this crate's panic strategy `abort`
25
//@ dont-check-compiler-stderr
36
//@ aux-build:panic-runtime-unwind.rs
47
//@ compile-flags:-C panic=abort
@@ -7,6 +10,7 @@ extern crate panic_runtime_unwind;
710

811
fn main() {}
912

10-
//~? ERROR cannot link together two panic runtimes: panic_unwind and panic_runtime_unwind
11-
//~? ERROR the linked panic runtime `panic_runtime_unwind` is not compiled with this crate's panic strategy `abort`
12-
//~? ERROR the crate `panic_unwind` requires panic strategy `unwind` which is incompatible with this crate's strategy of `abort`
13+
// FIXME: The first and third errors are target-dependent.
14+
//FIXME~? ERROR cannot link together two panic runtimes: panic_unwind and panic_runtime_unwind
15+
//FIXME~? ERROR the linked panic runtime `panic_runtime_unwind` is not compiled with this crate's panic strategy `abort`
16+
//FIXME~? ERROR the crate `panic_unwind` requires panic strategy `unwind` which is incompatible with this crate's strategy of `abort`

Diff for: tests/ui/panic-runtime/want-abort-got-unwind2.rs

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
// ignore-tidy-linelength
12
//@ build-fail
3+
//@ compile-flags: --error-format=human
4+
//@ error-pattern: the linked panic runtime `panic_runtime_unwind` is not compiled with this crate's panic strategy `abort`
25
//@ dont-check-compiler-stderr
36
//@ aux-build:panic-runtime-unwind.rs
47
//@ aux-build:wants-panic-runtime-unwind.rs
@@ -8,6 +11,7 @@ extern crate wants_panic_runtime_unwind;
811

912
fn main() {}
1013

11-
//~? ERROR cannot link together two panic runtimes: panic_unwind and panic_runtime_unwind
12-
//~? ERROR the linked panic runtime `panic_runtime_unwind` is not compiled with this crate's panic strategy `abort`
13-
//~? ERROR the crate `panic_unwind` requires panic strategy `unwind` which is incompatible with this crate's strategy of `abort`
14+
// FIXME: The first and third errors are target-dependent.
15+
//FIXME~? ERROR cannot link together two panic runtimes: panic_unwind and panic_runtime_unwind
16+
//FIXME~? ERROR the linked panic runtime `panic_runtime_unwind` is not compiled with this crate's panic strategy `abort`
17+
//FIXME~? ERROR the crate `panic_unwind` requires panic strategy `unwind` which is incompatible with this crate's strategy of `abort`

Diff for: tests/ui/print-request/stability.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
//@ revisions: crate_root_lint_levels
2121
//@[crate_root_lint_levels] compile-flags: --print=crate-root-lint-levels
22-
//@[crate_root_lint_levels] error-pattern: the `-Z unstable-options` flag must also be passed
2322

2423
//@ revisions: check_cfg
2524
//@[check_cfg] compile-flags: --print=check-cfg
@@ -107,6 +106,7 @@
107106
fn main() {}
108107

109108
//[all_target_specs_json]~? ERROR the `-Z unstable-options` flag must also be passed to enable the `all-target-specs-json` print option
109+
//[crate_root_lint_levels]~? ERROR the `-Z unstable-options` flag must also be passed to enable the `crate-root-lint-levels` print option
110110
//[check_cfg]~? ERROR the `-Z unstable-options` flag must also be passed to enable the `check-cfg` print option
111111
//[supported_crate_types]~? ERROR the `-Z unstable-options` flag must also be passed to enable the `supported-crate-types` print option
112112
//[target_spec_json]~? ERROR the `-Z unstable-options` flag must also be passed to enable the `target-spec-json` print option

0 commit comments

Comments
 (0)