Skip to content

Commit 2a3de63

Browse files
authored
Rollup merge of rust-lang#130860 - tmandry:fix-directives, r=compiler-errors
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`
2 parents 31f854f + c5925ef commit 2a3de63

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
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+
//@[proc_macro_] force-host
16+
//@[proc_macro_] no-prefer-dynamic
1717

1818
//@[cdylib_] compile-flags: --crate-type=cdylib
1919
//@[dylib_] compile-flags: --crate-type=dylib

0 commit comments

Comments
 (0)