Skip to content

Commit

Permalink
Rollup merge of #105434 - nbdd0121:lib, r=thomcc
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
matthiaskrgr committed Dec 8, 2022
2 parents 9289c92 + a3c4c2e commit a147868
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion library/core/src/num/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit a147868

Please sign in to comment.