From 1ba47ea06c8f6d656b7b5bd4f2800c51ad75f7a3 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 28 Feb 2024 15:49:48 +1100 Subject: [PATCH] Use `LitKind::Err` for floats with empty exponents. This prevents a follow-up type error in a test, which seems fine. --- tests/ui/crashes/ice-10912.rs | 2 -- tests/ui/crashes/ice-10912.stderr | 11 +---------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/tests/ui/crashes/ice-10912.rs b/tests/ui/crashes/ice-10912.rs index 8dfce19422171..1d689e1d0082d 100644 --- a/tests/ui/crashes/ice-10912.rs +++ b/tests/ui/crashes/ice-10912.rs @@ -2,7 +2,5 @@ //@no-rustfix fn f2() -> impl Sized { && 3.14159265358979323846E } //~^ ERROR: expected at least one digit in exponent -//~| ERROR: long literal lacking separators -//~| NOTE: `-D clippy::unreadable-literal` implied by `-D warnings` fn main() {} diff --git a/tests/ui/crashes/ice-10912.stderr b/tests/ui/crashes/ice-10912.stderr index cc80354c7c626..c697e54679f96 100644 --- a/tests/ui/crashes/ice-10912.stderr +++ b/tests/ui/crashes/ice-10912.stderr @@ -4,14 +4,5 @@ error: expected at least one digit in exponent LL | fn f2() -> impl Sized { && 3.14159265358979323846E } | ^^^^^^^^^^^^^^^^^^^^^^^ -error: long literal lacking separators - --> tests/ui/crashes/ice-10912.rs:3:28 - | -LL | fn f2() -> impl Sized { && 3.14159265358979323846E } - | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider: `3.141_592_653_589_793_238_46` - | - = note: `-D clippy::unreadable-literal` implied by `-D warnings` - = help: to override `-D warnings` add `#[allow(clippy::unreadable_literal)]` - -error: aborting due to 2 previous errors +error: aborting due to 1 previous error