Skip to content

Commit 5bab360

Browse files
committed
Fix directives for lint-non-snake-case-crate
This test fails on targets without unwinding 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. Fixes Fuchsia tests.
1 parent 3f1be1e commit 5bab360

7 files changed

+19
-16
lines changed

tests/ui/lint/non-snake-case/lint-non-snake-case-crate.cdylib_.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error: crate `NonSnakeCase` should have a snake case name
2-
--> $DIR/lint-non-snake-case-crate.rs:29:18
2+
--> $DIR/lint-non-snake-case-crate.rs:32:18
33
|
44
LL | #![crate_name = "NonSnakeCase"]
55
| ^^^^^^^^^^^^ help: convert the identifier to snake case: `non_snake_case`
66
|
77
note: the lint level is defined here
8-
--> $DIR/lint-non-snake-case-crate.rs:31:9
8+
--> $DIR/lint-non-snake-case-crate.rs:34:9
99
|
1010
LL | #![deny(non_snake_case)]
1111
| ^^^^^^^^^^^^^^

tests/ui/lint/non-snake-case/lint-non-snake-case-crate.dylib_.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error: crate `NonSnakeCase` should have a snake case name
2-
--> $DIR/lint-non-snake-case-crate.rs:29:18
2+
--> $DIR/lint-non-snake-case-crate.rs:32:18
33
|
44
LL | #![crate_name = "NonSnakeCase"]
55
| ^^^^^^^^^^^^ help: convert the identifier to snake case: `non_snake_case`
66
|
77
note: the lint level is defined here
8-
--> $DIR/lint-non-snake-case-crate.rs:31:9
8+
--> $DIR/lint-non-snake-case-crate.rs:34:9
99
|
1010
LL | #![deny(non_snake_case)]
1111
| ^^^^^^^^^^^^^^

tests/ui/lint/non-snake-case/lint-non-snake-case-crate.lib_.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error: crate `NonSnakeCase` should have a snake case name
2-
--> $DIR/lint-non-snake-case-crate.rs:29:18
2+
--> $DIR/lint-non-snake-case-crate.rs:32:18
33
|
44
LL | #![crate_name = "NonSnakeCase"]
55
| ^^^^^^^^^^^^ help: convert the identifier to snake case: `non_snake_case`
66
|
77
note: the lint level is defined here
8-
--> $DIR/lint-non-snake-case-crate.rs:31:9
8+
--> $DIR/lint-non-snake-case-crate.rs:34:9
99
|
1010
LL | #![deny(non_snake_case)]
1111
| ^^^^^^^^^^^^^^

tests/ui/lint/non-snake-case/lint-non-snake-case-crate.proc_macro_.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error: crate `NonSnakeCase` should have a snake case name
2-
--> $DIR/lint-non-snake-case-crate.rs:29:18
2+
--> $DIR/lint-non-snake-case-crate.rs:32:18
33
|
44
LL | #![crate_name = "NonSnakeCase"]
55
| ^^^^^^^^^^^^ help: convert the identifier to snake case: `non_snake_case`
66
|
77
note: the lint level is defined here
8-
--> $DIR/lint-non-snake-case-crate.rs:31:9
8+
--> $DIR/lint-non-snake-case-crate.rs:34:9
99
|
1010
LL | #![deny(non_snake_case)]
1111
| ^^^^^^^^^^^^^^

tests/ui/lint/non-snake-case/lint-non-snake-case-crate.rlib_.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error: crate `NonSnakeCase` should have a snake case name
2-
--> $DIR/lint-non-snake-case-crate.rs:29:18
2+
--> $DIR/lint-non-snake-case-crate.rs:32:18
33
|
44
LL | #![crate_name = "NonSnakeCase"]
55
| ^^^^^^^^^^^^ help: convert the identifier to snake case: `non_snake_case`
66
|
77
note: the lint level is defined here
8-
--> $DIR/lint-non-snake-case-crate.rs:31:9
8+
--> $DIR/lint-non-snake-case-crate.rs:34:9
99
|
1010
LL | #![deny(non_snake_case)]
1111
| ^^^^^^^^^^^^^^

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

+7-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@
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+
// FIXME(#132309): dylib crate type is not supported on wasm; we need a proper
14+
// supports-crate-type directive
15+
//@[dylib_] ignore-wasm
16+
//@[dylib_] needs-dynamic-linking
17+
//@[cdylib_] needs-dynamic-linking
18+
//@[proc_macro_] force-host
19+
//@[proc_macro_] no-prefer-dynamic
1720

1821
//@[cdylib_] compile-flags: --crate-type=cdylib
1922
//@[dylib_] compile-flags: --crate-type=dylib

tests/ui/lint/non-snake-case/lint-non-snake-case-crate.staticlib_.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error: crate `NonSnakeCase` should have a snake case name
2-
--> $DIR/lint-non-snake-case-crate.rs:29:18
2+
--> $DIR/lint-non-snake-case-crate.rs:32:18
33
|
44
LL | #![crate_name = "NonSnakeCase"]
55
| ^^^^^^^^^^^^ help: convert the identifier to snake case: `non_snake_case`
66
|
77
note: the lint level is defined here
8-
--> $DIR/lint-non-snake-case-crate.rs:31:9
8+
--> $DIR/lint-non-snake-case-crate.rs:34:9
99
|
1010
LL | #![deny(non_snake_case)]
1111
| ^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)