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

Fixed Windows compile errors #447

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

zardini123
Copy link
Contributor

Currently when compiling on Windows (toolchain stable-x86_64-pc-windows-msvc), there is two compile errors. Both compile errors are due to men::transmute calls in nasty_hack_exit_code_eq, which fail to compile due to transmuting a ExitCode of 32 bits into a 8 bit u8. The error is:

error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
   --> tests\report.rs:210:10
    |
210 |         (mem::transmute(left), mem::transmute(right))
    |          ^^^^^^^^^^^^^^
    |
    = note: source type: `ExitCode` (32 bits)
    = note: target type: `u8` (8 bits)

This PR solves this problem by changing the transmute type to a u32 on Windows using conditional compilation. The result is the project compiles and tests successfully on Windows.

Copy link

netlify bot commented Mar 28, 2024

Deploy Preview for shepmaster-snafu ready!

Name Link
🔨 Latest commit adf7c01
🔍 Latest deploy log https://app.netlify.com/sites/shepmaster-snafu/deploys/660d8e817f0be90008b73f78
😎 Deploy Preview https://deploy-preview-447--shepmaster-snafu.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@zardini123 zardini123 changed the title Fixed Windows compile error for ExitCode equivalence function Fixed Windows compile errors Mar 28, 2024
@shepmaster shepmaster merged commit 117aeee into shepmaster:main Apr 3, 2024
12 checks passed
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

Successfully merging this pull request may close these issues.

2 participants