Skip to content

Commit 433189b

Browse files
authored
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.
2 parents d429e46 + a3c4c2e commit 433189b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

library/core/src/num/mod.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44

55
use crate::ascii;
66
use crate::convert::TryInto;
7-
use crate::error::Error;
87
use crate::intrinsics;
98
use crate::mem;
109
use crate::ops::{Add, Mul, Sub};
1110
use crate::str::FromStr;
1211

12+
#[cfg(not(no_fp_fmt_parse))]
13+
use crate::error::Error;
14+
1315
// Used because the `?` operator is not allowed in a const context.
1416
macro_rules! try_opt {
1517
($e:expr) => {

0 commit comments

Comments
 (0)