diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67e507a4a8..9c48978313 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -341,6 +341,15 @@ jobs: run: ./cargo.sh +${{ matrix.toolchain }} build --package ${{ matrix.crate }} --target ${{ matrix.target }} ${{ matrix.features }} --verbose if: matrix.target != 'thumbv6m-none-eabi' + # Ensure that, when the standard library is built with `--cfg + # no_fp_fmt_parse`, building zerocopy with the same `--cfg` succeeds (note + # that `RUSTFLAGS='--cfg no_fp_fmt_parse'` is doing double-duty here - it's + # setting the environment variable for both the standard library build and + # for the zerocopy build). + - name: Build without floating point support + run: RUSTFLAGS='--cfg no_fp_fmt_parse' ./cargo.sh +${{ matrix.toolchain }} build -Zbuild-std --package ${{ matrix.crate }} --target ${{ matrix.target }} ${{ matrix.features }} --verbose + if: matrix.target != 'thumbv6m-none-eabi' + # When building tests for the i686 target, we need certain libraries which # are not installed by default; `gcc-multilib` includes these libraries. - name: Install gcc-multilib diff --git a/src/byteorder.rs b/src/byteorder.rs index 0e6a7ea5da..96c615d268 100644 --- a/src/byteorder.rs +++ b/src/byteorder.rs @@ -174,6 +174,7 @@ macro_rules! impl_fmt_trait { macro_rules! impl_fmt_traits { ($name:ident, $native:ident, "floating point number") => { + #[cfg(not(no_fp_fmt_parse))] impl_fmt_trait!($name, $native, Display); }; ($name:ident, $native:ident, "unsigned integer") => {