Skip to content

Warn or error on platform-specific integer conversions #2425

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

Closed
eholk opened this issue May 22, 2012 · 1 comment
Closed

Warn or error on platform-specific integer conversions #2425

eholk opened this issue May 22, 2012 · 1 comment

Comments

@eholk
Copy link
Contributor

eholk commented May 22, 2012

Code like

let i : i64 = 0;

will fail to compile on 32-bit machines, because the type int is 32-bits, but succeed on 64-bit builds because there int and i64 are the same. It'd be nice if the compiler could report cases where we're assuming particular sizes for int or uint so we don't get bit by cross-platform build failures later.

@nikomatsakis
Copy link
Contributor

duplicate of #2187

bors added a commit to rust-lang-ci/rust that referenced this issue Sep 22, 2022
don't dump xargo output onto users of 'cargo miri test'

The xargo invocation prints a lot of details users probably won't care about, so let's hide them (unless the user did `cargo miri setup`, then we still print everything).
celinval added a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
… support (rust-lang#2425)

This will also give visibility to the compiler to whether this feature is enabled or not which is needed to avoid type mismatch issue (model-checking/kani#1781).

Co-authored-by: Adrian Palacios <[email protected]>
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