Skip to content
/ rust Public
forked from rust-lang/rust

Commit 83640aa

Browse files
authored
Rollup merge of rust-lang#135225 - erickt:fix-test, r=jieyouxu
Explicitly build proc macro test with panic=unwind Fuchsia explicitly builds rust and all rust targets with `-C panic=abort` to minimize code generation size. However, when compiling a proc-macro with this setting it can cause a warning to be emitted, which breaks `tests/ui/invalid-compile-flags/crate-type-flag.rs`. This hasn't been a problem in the past for us since we compile our proc macros on host, rather than inside Fuchsia. This attempts to fix the issue by explicitly requiring that we're using the unwinder when compiling this test to avoid the warning being emitted. Fixes rust-lang#135223
2 parents 1fe894a + 4994296 commit 83640aa

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

compiler/rustc_codegen_cranelift/scripts/test_rustc_tests.sh

-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ rm tests/ui/mir/mir_raw_fat_ptr.rs # same
123123
rm tests/ui/consts/issue-33537.rs # same
124124
rm tests/ui/consts/const-mut-refs-crate.rs # same
125125
rm tests/ui/abi/large-byval-align.rs # exceeds implementation limit of Cranelift
126-
rm tests/ui/invalid-compile-flags/crate-type-flag.rs # warning about proc-macros and panic=abort
127126

128127
# doesn't work due to the way the rustc test suite is invoked.
129128
# should work when using ./x.py test the way it is intended

tests/ui/invalid-compile-flags/crate-type-flag.rs

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
//@[bin] check-pass
3131

3232
//@[proc_dash_macro] ignore-wasm (proc-macro is not supported)
33+
//@[proc_dash_macro] needs-unwind (panic=abort causes warning to be emitted)
3334
//@[proc_dash_macro] compile-flags: --crate-type=proc-macro
3435
//@[proc_dash_macro] check-pass
3536

0 commit comments

Comments
 (0)