Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test failure on 32 bit architectures #43

Open
davide125 opened this issue Jun 25, 2021 · 1 comment
Open

test failure on 32 bit architectures #43

davide125 opened this issue Jun 25, 2021 · 1 comment

Comments

@davide125
Copy link

One test fails when building on i686 or armv7hl

---- src/lib.rs - (line 26) stdout ----
Test executable failed (exit code 101).
stderr:
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `12`,
 right: `8`', src/lib.rs:10:1
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
    src/lib.rs - (line 26)

You can see the full logs at https://koji.fedoraproject.org/koji/taskinfo?taskID=70819940 and https://koji.fedoraproject.org/koji/taskinfo?taskID=70819939 (look at build.log).

@CAD97
Copy link

CAD97 commented Jun 26, 2021

That's this doc test:

beef/src/lib.rs

Lines 26 to 34 in 175938a

//! ```rust
//! use std::mem::size_of;
//!
//! const WORD: usize = size_of::<usize>();
//!
//! assert_eq!(size_of::<std::borrow::Cow<str>>(), 4 * WORD);
//! assert_eq!(size_of::<beef::Cow<str>>(), 3 * WORD);
//! assert_eq!(size_of::<beef::lean::Cow<str>>(), 2 * WORD);
//! ```

The third assert is incorrect on 32 bit targets, since 32 bit targets reexport the 3-usize Cow (#40).

This is nonfatal, but should definitely still be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants