Skip to content

Commit 1f7ac87

Browse files
committed
Emit error when using path-segment keyword as cfg pred
1 parent 04d65f9 commit 1f7ac87

9 files changed

+22
-22
lines changed

tests/ui/cast_size.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
//@revisions: 32bit 64bit
2-
//@[32bit]ignore-bitwidth: 64
3-
//@[64bit]ignore-bitwidth: 32
1+
//@revisions: r32bit r64bit
2+
//@[r32bit]ignore-bitwidth: 64
3+
//@[r64bit]ignore-bitwidth: 32
44
//@no-rustfix: only some diagnostics have suggestions
55

66
#![warn(
@@ -62,7 +62,7 @@ fn main() {
6262
//~^ cast_precision_loss
6363
9_999_999_999_999_999usize as f64;
6464
//~^ cast_precision_loss
65-
//~[32bit]^^ ERROR: literal out of range for `usize`
65+
//~[r32bit]^^ ERROR: literal out of range for `usize`
6666
// 999_999_999_999_999_999_999_999_999_999u128 as f128;
6767
}
6868

tests/ui/fn_to_numeric_cast.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
//@revisions: 32bit 64bit
2-
//@[32bit]ignore-bitwidth: 64
3-
//@[64bit]ignore-bitwidth: 32
1+
//@revisions: r32bit r64bit
2+
//@[r32bit]ignore-bitwidth: 64
3+
//@[r64bit]ignore-bitwidth: 32
44
//@no-rustfix
55
#![warn(clippy::fn_to_numeric_cast, clippy::fn_to_numeric_cast_with_truncation)]
66
#![allow(function_casts_as_integer)]
@@ -15,8 +15,8 @@ fn test_function_to_numeric_cast() {
1515
let _ = foo as i16;
1616
//~^ fn_to_numeric_cast_with_truncation
1717
let _ = foo as i32;
18-
//~[64bit]^ fn_to_numeric_cast_with_truncation
19-
//~[32bit]^^ fn_to_numeric_cast
18+
//~[r64bit]^ fn_to_numeric_cast_with_truncation
19+
//~[r32bit]^^ fn_to_numeric_cast
2020
let _ = foo as i64;
2121
//~^ fn_to_numeric_cast
2222
let _ = foo as i128;
@@ -29,8 +29,8 @@ fn test_function_to_numeric_cast() {
2929
let _ = foo as u16;
3030
//~^ fn_to_numeric_cast_with_truncation
3131
let _ = foo as u32;
32-
//~[64bit]^ fn_to_numeric_cast_with_truncation
33-
//~[32bit]^^ fn_to_numeric_cast
32+
//~[r64bit]^ fn_to_numeric_cast_with_truncation
33+
//~[r32bit]^^ fn_to_numeric_cast
3434
let _ = foo as u64;
3535
//~^ fn_to_numeric_cast
3636
let _ = foo as u128;
@@ -52,8 +52,8 @@ fn test_function_var_to_numeric_cast() {
5252
let _ = abc as i16;
5353
//~^ fn_to_numeric_cast_with_truncation
5454
let _ = abc as i32;
55-
//~[64bit]^ fn_to_numeric_cast_with_truncation
56-
//~[32bit]^^ fn_to_numeric_cast
55+
//~[r64bit]^ fn_to_numeric_cast_with_truncation
56+
//~[r32bit]^^ fn_to_numeric_cast
5757
let _ = abc as i64;
5858
//~^ fn_to_numeric_cast
5959
let _ = abc as i128;
@@ -66,8 +66,8 @@ fn test_function_var_to_numeric_cast() {
6666
let _ = abc as u16;
6767
//~^ fn_to_numeric_cast_with_truncation
6868
let _ = abc as u32;
69-
//~[64bit]^ fn_to_numeric_cast_with_truncation
70-
//~[32bit]^^ fn_to_numeric_cast
69+
//~[r64bit]^ fn_to_numeric_cast_with_truncation
70+
//~[r32bit]^^ fn_to_numeric_cast
7171
let _ = abc as u64;
7272
//~^ fn_to_numeric_cast
7373
let _ = abc as u128;
@@ -79,8 +79,8 @@ fn test_function_var_to_numeric_cast() {
7979

8080
fn fn_with_fn_args(f: fn(i32) -> i32) -> i32 {
8181
f as i32
82-
//~[64bit]^ fn_to_numeric_cast_with_truncation
83-
//~[32bit]^^ fn_to_numeric_cast
82+
//~[r64bit]^ fn_to_numeric_cast_with_truncation
83+
//~[r32bit]^^ fn_to_numeric_cast
8484
}
8585

8686
fn main() {}

tests/ui/large_enum_variant.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
//@revisions: 32bit 64bit
1+
//@revisions: r32bit r64bit
22
//@aux-build:proc_macros.rs
33
//@no-rustfix
4-
//@[32bit]ignore-bitwidth: 64
5-
//@[64bit]ignore-bitwidth: 32
4+
//@[r32bit]ignore-bitwidth: 64
5+
//@[r64bit]ignore-bitwidth: 32
66
#![allow(dead_code)]
77
#![allow(unused_variables)]
88
#![warn(clippy::large_enum_variant)]
@@ -221,13 +221,13 @@ mod issue11915 {
221221
}
222222

223223
enum NoWarnings {
224-
//~[64bit]^ large_enum_variant
224+
//~[r64bit]^ large_enum_variant
225225
BigBoi(PublishWithBytes),
226226
_SmallBoi(u8),
227227
}
228228

229229
enum MakesClippyAngry {
230-
//~[64bit]^ large_enum_variant
230+
//~[r64bit]^ large_enum_variant
231231
BigBoi(PublishWithVec),
232232
_SmallBoi(u8),
233233
}

0 commit comments

Comments
 (0)