Skip to content

Commit 614ffe5

Browse files
authored
Rollup merge of #60962 - VeryTastyTomato:patch-1, r=jonas-schievink
Fix data types indication 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
2 parents 787d49e + a759565 commit 614ffe5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libcore/fmt/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ pub trait Pointer {
886886
///
887887
/// # Examples
888888
///
889-
/// Basic usage with `i32`:
889+
/// Basic usage with `f64`:
890890
///
891891
/// ```
892892
/// let x = 42.0; // 42.0 is '4.2e1' in scientific notation
@@ -929,7 +929,7 @@ pub trait LowerExp {
929929
///
930930
/// # Examples
931931
///
932-
/// Basic usage with `f32`:
932+
/// Basic usage with `f64`:
933933
///
934934
/// ```
935935
/// let x = 42.0; // 42.0 is '4.2E1' in scientific notation

0 commit comments

Comments
 (0)