From a759565763c51ed856937d3a8b520d26e5270ba2 Mon Sep 17 00:00:00 2001 From: VeryTastyTomato Date: Sun, 19 May 2019 13:51:46 +0000 Subject: [PATCH] Fix data types indication MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the data types indication in basic examples of the Trait std::fmt::LowerExp and std::fmt::UpperExp. Since there aren’t any type annotation on the let statement using the number 42.0, they are of type f64 according to The Book: https://doc.rust-lang.org/book/ch03-02-data-types.html#floating-point-types --- src/libcore/fmt/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs index 43c1a3b7767..2f6d745d146 100644 --- a/src/libcore/fmt/mod.rs +++ b/src/libcore/fmt/mod.rs @@ -886,7 +886,7 @@ pub trait Pointer { /// /// # Examples /// -/// Basic usage with `i32`: +/// Basic usage with `f64`: /// /// ``` /// let x = 42.0; // 42.0 is '4.2e1' in scientific notation @@ -929,7 +929,7 @@ pub trait LowerExp { /// /// # Examples /// -/// Basic usage with `f32`: +/// Basic usage with `f64`: /// /// ``` /// let x = 42.0; // 42.0 is '4.2E1' in scientific notation