File tree Expand file tree Collapse file tree 3 files changed +19
-8
lines changed
tests/run-make/panic-impl-transitive Expand file tree Collapse file tree 3 files changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,6 @@ run-make/output-with-hyphens/Makefile
190
190
run-make/override-aliased-flags/Makefile
191
191
run-make/overwrite-input/Makefile
192
192
run-make/panic-abort-eh_frame/Makefile
193
- run-make/panic-impl-transitive/Makefile
194
193
run-make/pass-linker-flags-flavor/Makefile
195
194
run-make/pass-linker-flags-from-dep/Makefile
196
195
run-make/pass-linker-flags/Makefile
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ // In Rust programs where the standard library is unavailable (#![no_std]), we may be interested
2
+ // in customizing how panics are handled. Here, the provider specifies that panics should be handled
3
+ // by entering an infinite loop. This test checks that this panic implementation can be transitively
4
+ // provided by an external crate.
5
+ // --emit=llvm-ir is used to avoid running the linker, as linking will fail due to the lack of main
6
+ // function in the crate.
7
+ // See https://github.com/rust-lang/rust/pull/50338
8
+
9
+ use run_make_support::{rustc, tmp_dir};
10
+
11
+ fn main() {
12
+ rustc().input("panic-impl-provider.rs").run();
13
+ rustc()
14
+ .input("panic-impl-consumer.rs")
15
+ .panic("abort")
16
+ .emit("llvm-ir")
17
+ .library_search_path(tmp_dir())
18
+ .run();
19
+ }
You can’t perform that action at this time.
0 commit comments