-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create new E0768 error code for "no valid digits found for number" error
- Loading branch information
1 parent
f844ea1
commit d64a4b5
Showing
3 changed files
with
22 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
A number in a non-decimal base has no digits. | ||
|
||
Erroneous code example: | ||
|
||
```compile_fail,E0768 | ||
let s: i32 = 0b; // error! | ||
``` | ||
|
||
To fix this error, add the missing digits: | ||
|
||
``` | ||
let s: i32 = 0b1; // ok! | ||
``` |
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