Skip to content

Commit 3917a29

Browse files
Update tests
1 parent c3b3cb3 commit 3917a29

File tree

2 files changed

+23
-28
lines changed

2 files changed

+23
-28
lines changed

Diff for: tests/ui/disallowed_script_idents.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ fn main() {
99

1010
// Cyrillic is not allowed by default.
1111
let счётчик = 10;
12-
//~^ ERROR: identifier `счётчик` has a Unicode script that is not allowed by configura
12+
//~^ disallowed_script_idents
13+
1314
// Same for japanese.
1415
let カウンタ = 10;
15-
//~^ ERROR: identifier `カウンタ` has a Unicode script that is not allowed by configuratio
16+
//~^ disallowed_script_idents
1617
}

Diff for: tests/ui/literals.rs

+20-26
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,28 @@ fn main() {
1111
let ok1 = 0xABCD;
1212
let ok3 = 0xab_cd;
1313
let ok4 = 0xab_cd_i32;
14-
//~^ ERROR: integer type suffix should not be separated by an underscore
15-
//~| NOTE: `-D clippy::separated-literal-suffix` implied by `-D warnings`
14+
//~^ separated_literal_suffix
1615
let ok5 = 0xAB_CD_u32;
17-
//~^ ERROR: integer type suffix should not be separated by an underscore
16+
//~^ separated_literal_suffix
1817
let ok5 = 0xAB_CD_isize;
19-
//~^ ERROR: integer type suffix should not be separated by an underscore
18+
//~^ separated_literal_suffix
2019
let fail1 = 0xabCD;
21-
//~^ ERROR: inconsistent casing in hexadecimal literal
22-
//~| NOTE: `-D clippy::mixed-case-hex-literals` implied by `-D warnings`
20+
//~^ mixed_case_hex_literals
2321
let fail2 = 0xabCD_u32;
24-
//~^ ERROR: integer type suffix should not be separated by an underscore
25-
//~| ERROR: inconsistent casing in hexadecimal literal
22+
//~^ mixed_case_hex_literals
23+
//~| separated_literal_suffix
2624
let fail2 = 0xabCD_isize;
27-
//~^ ERROR: integer type suffix should not be separated by an underscore
28-
//~| ERROR: inconsistent casing in hexadecimal literal
25+
//~^ separated_literal_suffix
26+
//~| mixed_case_hex_literals
2927
let fail_multi_zero = 000_123usize;
30-
//~^ ERROR: integer type suffix should be separated by an underscore
31-
//~| NOTE: `-D clippy::unseparated-literal-suffix` implied by `-D warnings`
32-
//~| ERROR: this is a decimal constant
33-
//~| NOTE: `-D clippy::zero-prefixed-literal` implied by `-D warnings`
28+
//~^ zero_prefixed_literal
29+
//~| unseparated_literal_suffix
3430

3531
let ok9 = 0;
3632
let ok10 = 0_i64;
37-
//~^ ERROR: integer type suffix should not be separated by an underscore
33+
//~^ separated_literal_suffix
3834
let fail8 = 0123;
39-
//~^ ERROR: this is a decimal constant
35+
//~^ zero_prefixed_literal
4036

4137
let ok11 = 0o123;
4238
let ok12 = 0b10_1010;
@@ -46,20 +42,18 @@ fn main() {
4642
let ok15 = 0xab_cabc_abca_bcab_cabc;
4743
let ok16 = 0xFE_BAFE_ABAB_ABCD;
4844
let ok17 = 0x123_4567_8901_usize;
49-
//~^ ERROR: integer type suffix should not be separated by an underscore
45+
//~^ separated_literal_suffix
5046
let ok18 = 0xF;
5147

5248
let fail19 = 12_3456_21;
53-
//~^ ERROR: digits grouped inconsistently by underscores
54-
//~| NOTE: `-D clippy::inconsistent-digit-grouping` implied by `-D warnings`
49+
//~^ inconsistent_digit_grouping
5550
let fail22 = 3__4___23;
56-
//~^ ERROR: digits grouped inconsistently by underscores
51+
//~^ inconsistent_digit_grouping
5752
let fail23 = 3__16___23;
58-
//~^ ERROR: digits grouped inconsistently by underscores
53+
//~^ inconsistent_digit_grouping
5954

6055
let fail24 = 0xAB_ABC_AB;
61-
//~^ ERROR: digits of hex, binary or octal literal not in groups of equal size
62-
//~| NOTE: `-D clippy::unusual-byte-groupings` implied by `-D warnings`
56+
//~^ unusual_byte_groupings
6357
let fail25 = 0b01_100_101;
6458
let ok26 = 0x6_A0_BF;
6559
let ok27 = 0b1_0010_0101;
@@ -68,9 +62,9 @@ fn main() {
6862
fn issue9651() {
6963
// lint but octal form is not possible here
7064
let _ = 08;
71-
//~^ ERROR: this is a decimal constant
65+
//~^ zero_prefixed_literal
7266
let _ = 09;
73-
//~^ ERROR: this is a decimal constant
67+
//~^ zero_prefixed_literal
7468
let _ = 089;
75-
//~^ ERROR: this is a decimal constant
69+
//~^ zero_prefixed_literal
7670
}

0 commit comments

Comments
 (0)