Skip to content

Commit a3c4c2e

Browse files
committed
Fix warning when libcore is compiled with no_fp_fmt_parse
1 parent 01fbc5a commit a3c4c2e

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)