Skip to content

Commit 1a4288e

Browse files
committed
Auto merge of #130860 - tmandry:fix-directives, r=<try>
Fix directives for lint-non-snake-case-crate This test fails on targets without unwinding or with `--target-rustcflags=-Cpanic=abort` because the proc macro was compiled as the target, not the host. Some targets were explicitly disabled to pass CI, but these directives are more general. * `needs-dynamic-linking` is self explanatory * `force-host` for proc macros * `no-prefer-dynamic` is apparently also used for proc macros Note that `needs-unwind` can also be useful for situations other than proc macros where unwinding is necessary. r? `@jieyouxu` try-job: test-various
2 parents 3f1be1e + 73dc720 commit 1a4288e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/ui/lint/non-snake-case/lint-non-snake-case-crate.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010

1111
// But should fire on non-binary crates.
1212

13-
//@[cdylib_] ignore-musl (dylibs are not supported)
14-
//@[dylib_] ignore-musl (dylibs are not supported)
15-
//@[dylib_] ignore-wasm (dylib is not supported)
16-
//@[proc_macro_] ignore-wasm (dylib is not supported)
13+
//@[cdylib_] needs-dynamic-linking
14+
//@[dylib_] needs-dynamic-linking
15+
// FIXME: dylib crate type is not supported on wasm; we need a proper supports-crate-type directive
16+
//@[dylib_] ignore-wasm
17+
//@[proc_macro_] force-host
18+
//@[proc_macro_] no-prefer-dynamic
1719

1820
//@[cdylib_] compile-flags: --crate-type=cdylib
1921
//@[dylib_] compile-flags: --crate-type=dylib

0 commit comments

Comments
 (0)