diff options
| author | Gary Guo <gary@garyguo.net> | 2022-12-08 00:07:00 +0000 |
|---|---|---|
| committer | Gary Guo <gary@garyguo.net> | 2022-12-08 00:16:49 +0000 |
| commit | a3c4c2ee1d8d94141328d2b955ec7dc4aa67aa54 (patch) | |
| tree | 0cecf92db97d08dff15587f0668f06f67c879515 | |
| parent | 01fbc5ae789fc0c7a2da71d3cd908451f175e4eb (diff) | |
| download | rust-a3c4c2ee1d8d94141328d2b955ec7dc4aa67aa54.tar.gz rust-a3c4c2ee1d8d94141328d2b955ec7dc4aa67aa54.zip | |
Fix warning when libcore is compiled with no_fp_fmt_parse
| -rw-r--r-- | library/core/src/num/mod.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/library/core/src/num/mod.rs b/library/core/src/num/mod.rs index b2328b001de..ac7f579ebb5 100644 --- a/library/core/src/num/mod.rs +++ b/library/core/src/num/mod.rs @@ -4,12 +4,14 @@ use crate::ascii; use crate::convert::TryInto; -use crate::error::Error; use crate::intrinsics; use crate::mem; use crate::ops::{Add, Mul, Sub}; use crate::str::FromStr; +#[cfg(not(no_fp_fmt_parse))] +use crate::error::Error; + // Used because the `?` operator is not allowed in a const context. macro_rules! try_opt { ($e:expr) => { |
