Skip to content

Commit 1014970

Browse files
authored
Rollup merge of #131757 - c6c7:fixup-lint-non-snake-case-crate, r=jieyouxu
Ignore lint-non-snake-case-crate#proc_macro_ on targets without unwind The lint-non-snake-case-crate test may emit a warning in stderr if the target does not support unwinding ``` warning: building proc macro crate with `panic=abort` may crash the compiler should the proc-macro panic ``` Consequently, the test will fail on targets that don't support unwinding as written. This change modifies the expected stderr for lint-non-snake-case-crate in the proc_macro_ to ignore lines that indicate a warning was emitted.
2 parents aac91f7 + 8991fd4 commit 1014970

7 files changed

+16
-12
lines changed

Diff for: 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:25:18
2+
--> $DIR/lint-non-snake-case-crate.rs:29: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:27:9
8+
--> $DIR/lint-non-snake-case-crate.rs:31:9
99
|
1010
LL | #![deny(non_snake_case)]
1111
| ^^^^^^^^^^^^^^

Diff for: 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:25:18
2+
--> $DIR/lint-non-snake-case-crate.rs:29: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:27:9
8+
--> $DIR/lint-non-snake-case-crate.rs:31:9
99
|
1010
LL | #![deny(non_snake_case)]
1111
| ^^^^^^^^^^^^^^

Diff for: 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:25:18
2+
--> $DIR/lint-non-snake-case-crate.rs:29: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:27:9
8+
--> $DIR/lint-non-snake-case-crate.rs:31:9
99
|
1010
LL | #![deny(non_snake_case)]
1111
| ^^^^^^^^^^^^^^

Diff for: 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:25:18
2+
--> $DIR/lint-non-snake-case-crate.rs:29: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:27:9
8+
--> $DIR/lint-non-snake-case-crate.rs:31:9
99
|
1010
LL | #![deny(non_snake_case)]
1111
| ^^^^^^^^^^^^^^

Diff for: 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:25:18
2+
--> $DIR/lint-non-snake-case-crate.rs:29: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:27:9
8+
--> $DIR/lint-non-snake-case-crate.rs:31:9
99
|
1010
LL | #![deny(non_snake_case)]
1111
| ^^^^^^^^^^^^^^

Diff for: tests/ui/lint/non-snake-case/lint-non-snake-case-crate.rs

+4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
//@[rlib_] compile-flags: --crate-type=rlib
2323
//@[staticlib_] compile-flags: --crate-type=staticlib
2424

25+
// The compiler may emit a warning that causes stderr output
26+
// that contains a warning this test does not wish to check.
27+
//@[proc_macro_] needs-unwind
28+
2529
#![crate_name = "NonSnakeCase"]
2630
//[cdylib_,dylib_,lib_,proc_macro_,rlib_,staticlib_]~^ ERROR crate `NonSnakeCase` should have a snake case name
2731
#![deny(non_snake_case)]

Diff for: 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:25:18
2+
--> $DIR/lint-non-snake-case-crate.rs:29: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:27:9
8+
--> $DIR/lint-non-snake-case-crate.rs:31:9
99
|
1010
LL | #![deny(non_snake_case)]
1111
| ^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)