Skip to content

Commit

Permalink
Only run lint tests on x86_64-unknown-linux-gnu
Browse files Browse the repository at this point in the history
We're trying to test lint behavior, not per-target crate-type support.
  • Loading branch information
jieyouxu committed Mar 3, 2024
1 parent 82ceec9 commit d0111cb
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 13 deletions.
1 change: 1 addition & 0 deletions tests/ui/lint/lint-non-snake-case-crate-bin.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ only-x86_64-unknown-linux-gnu
//@ check-pass
#![crate_name = "NonSnakeCase"]

Expand Down
1 change: 1 addition & 0 deletions tests/ui/lint/lint-non-snake-case-crate-bin2.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ only-x86_64-unknown-linux-gnu
//@ compile-flags: --crate-name NonSnakeCase
//@ check-pass

Expand Down
1 change: 1 addition & 0 deletions tests/ui/lint/lint-non-snake-case-crate-bin3.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ only-x86_64-unknown-linux-gnu
//@ check-pass
#![crate_type = "bin"]
#![crate_name = "NonSnakeCase"]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/lint/lint-non-snake-case-crate-cdylib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ ignore-i686-unknown-linux-musl
//@ only-x86_64-unknown-linux-gnu
#![crate_type = "cdylib"]
#![crate_name = "NonSnakeCase"]
//~^ ERROR crate `NonSnakeCase` should have a snake case name
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/lint/lint-non-snake-case-crate-cdylib.stderr
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error: crate `NonSnakeCase` should have a snake case name
--> $DIR/lint-non-snake-case-crate-cdylib.rs:2:18
--> $DIR/lint-non-snake-case-crate-cdylib.rs:3:18
|
LL | #![crate_name = "NonSnakeCase"]
| ^^^^^^^^^^^^ help: convert the identifier to snake case: `non_snake_case`
|
note: the lint level is defined here
--> $DIR/lint-non-snake-case-crate-cdylib.rs:4:9
--> $DIR/lint-non-snake-case-crate-cdylib.rs:5:9
|
LL | #![deny(non_snake_case)]
| ^^^^^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/lint/lint-non-snake-case-crate-dylib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ ignore-wasm
//@ only-x86_64-unknown-linux-gnu
#![crate_type = "dylib"]
#![crate_name = "NonSnakeCase"]
//~^ ERROR crate `NonSnakeCase` should have a snake case name
Expand Down
1 change: 1 addition & 0 deletions tests/ui/lint/lint-non-snake-case-crate-lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ only-x86_64-unknown-linux-gnu
#![crate_type = "lib"]
#![crate_name = "NonSnakeCase"]
//~^ ERROR crate `NonSnakeCase` should have a snake case name
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/lint/lint-non-snake-case-crate-lib.stderr
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error: crate `NonSnakeCase` should have a snake case name
--> $DIR/lint-non-snake-case-crate-lib.rs:2:18
--> $DIR/lint-non-snake-case-crate-lib.rs:3:18
|
LL | #![crate_name = "NonSnakeCase"]
| ^^^^^^^^^^^^ help: convert the identifier to snake case: `non_snake_case`
|
note: the lint level is defined here
--> $DIR/lint-non-snake-case-crate-lib.rs:4:9
--> $DIR/lint-non-snake-case-crate-lib.rs:5:9
|
LL | #![deny(non_snake_case)]
| ^^^^^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/lint/lint-non-snake-case-crate-proc-macro.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ ignore-wasm
//@ only-x86_64-unknown-linux-gnu
#![crate_type = "proc-macro"]
#![crate_name = "NonSnakeCase"]
//~^ ERROR crate `NonSnakeCase` should have a snake case name
Expand Down
1 change: 1 addition & 0 deletions tests/ui/lint/lint-non-snake-case-crate-rlib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ only-x86_64-unknown-linux-gnu
#![crate_type = "rlib"]
#![crate_name = "NonSnakeCase"]
//~^ ERROR crate `NonSnakeCase` should have a snake case name
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/lint/lint-non-snake-case-crate-rlib.stderr
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error: crate `NonSnakeCase` should have a snake case name
--> $DIR/lint-non-snake-case-crate-rlib.rs:2:18
--> $DIR/lint-non-snake-case-crate-rlib.rs:3:18
|
LL | #![crate_name = "NonSnakeCase"]
| ^^^^^^^^^^^^ help: convert the identifier to snake case: `non_snake_case`
|
note: the lint level is defined here
--> $DIR/lint-non-snake-case-crate-rlib.rs:4:9
--> $DIR/lint-non-snake-case-crate-rlib.rs:5:9
|
LL | #![deny(non_snake_case)]
| ^^^^^^^^^^^^^^
Expand Down
3 changes: 1 addition & 2 deletions tests/ui/lint/lint-non-snake-case-crate-staticlib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//@ ignore-wasm

//@ only-x86_64-unknown-linux-gnu
#![crate_type = "staticlib"]
#![crate_name = "NonSnakeCase"]
//~^ ERROR crate `NonSnakeCase` should have a snake case name
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/lint/lint-non-snake-case-crate-staticlib.stderr
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error: crate `NonSnakeCase` should have a snake case name
--> $DIR/lint-non-snake-case-crate-staticlib.rs:4:18
--> $DIR/lint-non-snake-case-crate-staticlib.rs:3:18
|
LL | #![crate_name = "NonSnakeCase"]
| ^^^^^^^^^^^^ help: convert the identifier to snake case: `non_snake_case`
|
note: the lint level is defined here
--> $DIR/lint-non-snake-case-crate-staticlib.rs:6:9
--> $DIR/lint-non-snake-case-crate-staticlib.rs:5:9
|
LL | #![deny(non_snake_case)]
| ^^^^^^^^^^^^^^
Expand Down

0 comments on commit d0111cb

Please sign in to comment.