Auto merge of #127822 - Oneirical:amazon-rainfortest, r= · rust-lang/rust@f50c909 (original) (raw)
10 files changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -54,7 +54,6 @@ run-make/issue-36710/Makefile | ||
54 | 54 | run-make/issue-47551/Makefile |
55 | 55 | run-make/issue-69368/Makefile |
56 | 56 | run-make/issue-84395-lto-embed-bitcode/Makefile |
57 | -run-make/issue-85401-static-mir/Makefile | |
58 | 57 | run-make/issue-88756-default-output/Makefile |
59 | 58 | run-make/issue-97463-abi-param-passing/Makefile |
60 | 59 | run-make/jobserver-error/Makefile |
@@ -76,7 +75,6 @@ run-make/macos-deployment-target/Makefile | ||
76 | 75 | run-make/macos-fat-archive/Makefile |
77 | 76 | run-make/manual-link/Makefile |
78 | 77 | run-make/min-global-align/Makefile |
79 | -run-make/missing-crate-dependency/Makefile | |
80 | 78 | run-make/native-link-modifier-bundle/Makefile |
81 | 79 | run-make/native-link-modifier-whole-archive/Makefile |
82 | 80 | run-make/no-alloc-shim/Makefile |
@@ -122,5 +120,4 @@ run-make/test-benches/Makefile | ||
122 | 120 | run-make/thumb-none-cortex-m/Makefile |
123 | 121 | run-make/thumb-none-qemu/Makefile |
124 | 122 | run-make/translation/Makefile |
125 | -run-make/unstable-flag-required/Makefile | |
126 | 123 | run-make/x86_64-fortanix-unknown-sgx-lvi/Makefile |
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
1 | +// Trying to access mid-level internal representation (MIR) in statics | |
2 | +// used to cause an internal compiler error (ICE), now handled as a proper | |
3 | +// error since #100211. This test checks that the correct error is printed | |
4 | +// during the linking process, and not the ICE. | |
5 | +// See https://github.com/rust-lang/rust/issues/85401 | |
6 | + | |
7 | +use run_make_support::{bin_name, rust_lib_name, rustc}; | |
8 | + | |
9 | +fn main() { | |
10 | +rustc() | |
11 | +.crate_type("rlib") | |
12 | +.crate_name("foo") | |
13 | +.arg("-Crelocation-model=pic") | |
14 | +.edition("2018") | |
15 | +.input("foo.rs") | |
16 | +.arg("-Zalways-encode-mir=yes") | |
17 | +.emit("metadata") | |
18 | +.output("libfoo.rmeta") | |
19 | +.run(); | |
20 | +rustc() | |
21 | +.crate_type("rlib") | |
22 | +.crate_name("bar") | |
23 | +.arg("-Crelocation-model=pic") | |
24 | +.edition("2018") | |
25 | +.input("bar.rs") | |
26 | +.output(rust_lib_name("bar")) | |
27 | +.extern_("foo", "libfoo.rmeta") | |
28 | +.run(); | |
29 | +rustc() | |
30 | +.crate_type("bin") | |
31 | +.crate_name("baz") | |
32 | +.arg("-Crelocation-model=pic") | |
33 | +.edition("2018") | |
34 | +.input("baz.rs") | |
35 | +.output(bin_name("baz")) | |
36 | +.extern_("bar", rust_lib_name("bar")) | |
37 | +.run_fail() | |
38 | +.assert_stderr_contains( | |
39 | +"crate `foo` required to be available in rlib format, but was not found in this form", | |
40 | +) | |
41 | +.assert_stdout_not_contains("internal compiler error"); | |
42 | +} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
1 | +// A simple smoke test to check that rustc fails compilation | |
2 | +// and outputs a helpful message when a dependency is missing | |
3 | +// in a dependency chain. | |
4 | +// See https://github.com/rust-lang/rust/issues/12146 | |
5 | + | |
6 | +use run_make_support::{rfs, rust_lib_name, rustc}; | |
7 | + | |
8 | +fn main() { | |
9 | +rustc().crate_type("rlib").input("crateA.rs").run(); | |
10 | +rustc().crate_type("rlib").input("crateB.rs").run(); | |
11 | + rfs::remove_file(rust_lib_name("crateA")); | |
12 | +// Ensure that crateC fails to compile, as the crateA dependency is missing. | |
13 | +rustc() | |
14 | +.input("crateC.rs") | |
15 | +.run_fail() | |
16 | +.assert_stderr_contains("can't find crate for `crateA` which `crateB` depends on"); | |
17 | +} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
1 | +// The flag `--output-format` is unauthorized on beta and stable releases, which led | |
2 | +// to confusion for maintainers doing testing on nightly. Tying it to an unstable flag | |
3 | +// elucidates this, and this test checks that `--output-format` cannot be passed on its | |
4 | +// own. | |
5 | +// See https://github.com/rust-lang/rust/pull/82497 | |
6 | + | |
7 | +use run_make_support::{diff, rustdoc}; | |
8 | + | |
9 | +fn main() { | |
10 | +let out = rustdoc().output_format("json").input("x.html").run_fail().stderr_utf8(); | |
11 | +diff().expected_file("output-format-json.stderr").actual_text("actual-json", out).run(); | |
12 | +} |