Rollup merge of #104233 - compiler-errors:issue-104209, r=lcnr

Don't ICE when encountering `ConstKind::Error` in `RequiredConstsVisitor`

Fixes #104209
This commit is contained in:
Manish Goregaokar 2022-11-10 10:47:41 -05:00 committed by GitHub
commit 77fde5d49a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 1 deletions

View file

@ -0,0 +1,6 @@
fn f() -> impl Sized {
2.0E
//~^ ERROR expected at least one digit in exponent
}
fn main() {}

View file

@ -0,0 +1,8 @@
error: expected at least one digit in exponent
--> $DIR/invalid-const-in-body.rs:2:5
|
LL | 2.0E
| ^^^^
error: aborting due to previous error