diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-12-08 12:57:33 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-08 12:57:33 +0100 |
| commit | 433189b742abf281b07943d06b67bce387ef17f8 (patch) | |
| tree | 8d9b81bc8d8c55fc2fa6d663139567d0e9d45587 /library | |
| parent | d429e463c19fc45d70343779eef5b0b8f7231c70 (diff) | |
| parent | a3c4c2ee1d8d94141328d2b955ec7dc4aa67aa54 (diff) | |
| download | rust-433189b742abf281b07943d06b67bce387ef17f8.tar.gz rust-433189b742abf281b07943d06b67bce387ef17f8.zip | |
Rollup merge of #105434 - nbdd0121:lib, r=thomcc
Fix warning when libcore is compiled with no_fp_fmt_parse Discovered when trying to compile Rust-for-Linux with Rust 1.66 beta. It'll be helpful if this is backported to beta (should be trivial enough for backporting), so Rust-for-Linux's rust version bump wouldn't need to do `--cap-lints allow` for libcore.
Diffstat (limited to 'library')
| -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) => { |
