Only run lint tests on x86_64-unknown-linux-gnu

We're trying to test lint behavior, not per-target crate-type support.
This commit is contained in:
许杰友 Jieyou Xu (Joe) 2024-03-03 13:24:28 +00:00
parent 82ceec9d1d
commit d0111cb57a
No known key found for this signature in database
GPG Key ID: 95DDEBD74A1DC2C0
13 changed files with 17 additions and 13 deletions

View File

@ -1,3 +1,4 @@
//@ only-x86_64-unknown-linux-gnu
//@ check-pass
#![crate_name = "NonSnakeCase"]

View File

@ -1,3 +1,4 @@
//@ only-x86_64-unknown-linux-gnu
//@ compile-flags: --crate-name NonSnakeCase
//@ check-pass

View File

@ -1,3 +1,4 @@
//@ only-x86_64-unknown-linux-gnu
//@ check-pass
#![crate_type = "bin"]
#![crate_name = "NonSnakeCase"]

View File

@ -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

View File

@ -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)]
| ^^^^^^^^^^^^^^

View File

@ -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

View File

@ -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

View File

@ -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)]
| ^^^^^^^^^^^^^^

View File

@ -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

View File

@ -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

View File

@ -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)]
| ^^^^^^^^^^^^^^

View File

@ -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

View File

@ -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)]
| ^^^^^^^^^^^^^^