-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2441 from flip1995/literal_rep
Make decimal_literal_representation a restriction lint
- Loading branch information
Showing
5 changed files
with
25 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,43 @@ | ||
error: integer literal has a better hexadecimal representation | ||
--> $DIR/decimal_literal_representation.rs:10:9 | ||
--> $DIR/decimal_literal_representation.rs:18:9 | ||
| | ||
10 | 4096, // 0x1000 | ||
| ^^^^ | ||
| | ||
= note: `-D decimal-literal-representation` implied by `-D warnings` | ||
= help: consider: 0x1000 | ||
|
||
error: integer literal has a better hexadecimal representation | ||
--> $DIR/decimal_literal_representation.rs:11:9 | ||
| | ||
11 | 16_371, // 0x3FF3 | ||
| ^^^^^^ | ||
| | ||
= help: consider: 0x3FF3 | ||
|
||
error: integer literal has a better hexadecimal representation | ||
--> $DIR/decimal_literal_representation.rs:12:9 | ||
| | ||
12 | 32_773, // 0x8005 | ||
18 | 32_773, // 0x8005 | ||
| ^^^^^^ | ||
| | ||
= note: `-D decimal-literal-representation` implied by `-D warnings` | ||
= help: consider: 0x8005 | ||
|
||
error: integer literal has a better hexadecimal representation | ||
--> $DIR/decimal_literal_representation.rs:13:9 | ||
--> $DIR/decimal_literal_representation.rs:19:9 | ||
| | ||
13 | 65_280, // 0xFF00 | ||
19 | 65_280, // 0xFF00 | ||
| ^^^^^^ | ||
| | ||
= help: consider: 0xFF00 | ||
|
||
error: integer literal has a better hexadecimal representation | ||
--> $DIR/decimal_literal_representation.rs:14:9 | ||
--> $DIR/decimal_literal_representation.rs:20:9 | ||
| | ||
14 | 2_131_750_927, // 0x7F0F_F00F | ||
20 | 2_131_750_927, // 0x7F0F_F00F | ||
| ^^^^^^^^^^^^^ | ||
| | ||
= help: consider: 0x7F0F_F00F | ||
|
||
error: integer literal has a better hexadecimal representation | ||
--> $DIR/decimal_literal_representation.rs:15:9 | ||
--> $DIR/decimal_literal_representation.rs:21:9 | ||
| | ||
15 | 2_147_483_647, // 0x7FFF_FFFF | ||
21 | 2_147_483_647, // 0x7FFF_FFFF | ||
| ^^^^^^^^^^^^^ | ||
| | ||
= help: consider: 0x7FFF_FFFF | ||
|
||
error: integer literal has a better hexadecimal representation | ||
--> $DIR/decimal_literal_representation.rs:16:9 | ||
--> $DIR/decimal_literal_representation.rs:22:9 | ||
| | ||
16 | 4_042_322_160, // 0xF0F0_F0F0 | ||
22 | 4_042_322_160, // 0xF0F0_F0F0 | ||
| ^^^^^^^^^^^^^ | ||
| | ||
= help: consider: 0xF0F0_F0F0 | ||
|
||
error: aborting due to 7 previous errors | ||
error: aborting due to 5 previous errors | ||
|