Fix float ICE
Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com>
This commit is contained in:
parent
3d789740b0
commit
5f6059d9a2
@ -1032,6 +1032,8 @@ impl<'a> Parser<'a> {
|
||||
[IdentLike(_), Punct('+' | '-')] |
|
||||
// 1e+2 | 1e-2
|
||||
[IdentLike(_), Punct('+' | '-'), IdentLike(_)] |
|
||||
// 1.2e+ | 1.2e-
|
||||
[IdentLike(_), Punct('.'), IdentLike(_), Punct('+' | '-')] |
|
||||
// 1.2e+3 | 1.2e-3
|
||||
[IdentLike(_), Punct('.'), IdentLike(_), Punct('+' | '-'), IdentLike(_)] => {
|
||||
// See the FIXME about `TokenCursor` above.
|
||||
|
6
src/test/ui/parser/issue-90728.rs
Normal file
6
src/test/ui/parser/issue-90728.rs
Normal file
@ -0,0 +1,6 @@
|
||||
fn main() {
|
||||
a.5.2E+
|
||||
//~^ ERROR: unexpected token: `5.2E+`
|
||||
//~| ERROR: expected one of `.`, `;`, `?`, `}`, or an operator, found `5.2E+`
|
||||
//~| ERROR: expected at least one digit in exponent
|
||||
}
|
20
src/test/ui/parser/issue-90728.stderr
Normal file
20
src/test/ui/parser/issue-90728.stderr
Normal file
@ -0,0 +1,20 @@
|
||||
error: expected at least one digit in exponent
|
||||
--> $DIR/issue-90728.rs:2:7
|
||||
|
|
||||
LL | a.5.2E+
|
||||
| ^^^^^
|
||||
|
||||
error: unexpected token: `5.2E+`
|
||||
--> $DIR/issue-90728.rs:2:7
|
||||
|
|
||||
LL | a.5.2E+
|
||||
| ^^^^^
|
||||
|
||||
error: expected one of `.`, `;`, `?`, `}`, or an operator, found `5.2E+`
|
||||
--> $DIR/issue-90728.rs:2:7
|
||||
|
|
||||
LL | a.5.2E+
|
||||
| ^^^^^ expected one of `.`, `;`, `?`, `}`, or an operator
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
@ -9,7 +9,7 @@ const ENTRY_LIMIT: usize = 1000;
|
||||
// FIXME: The following limits should be reduced eventually.
|
||||
const ROOT_ENTRY_LIMIT: usize = 983;
|
||||
const ISSUES_ENTRY_LIMIT: usize = 2310;
|
||||
const PARSER_LIMIT: usize = 1010;
|
||||
const PARSER_LIMIT: usize = 1012;
|
||||
|
||||
fn check_entries(path: &Path, bad: &mut bool) {
|
||||
let dirs = walkdir::WalkDir::new(&path.join("test/ui"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user