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

Integer literals are allowed to be stored in a type which cannot represent them #6450

Closed
emberian opened this issue May 13, 2013 · 4 comments

Comments

@emberian
Copy link
Member

No description provided.

@emberian
Copy link
Member Author

Example: u8::to_str_radix(0x1fe, 2) == ~"11111110"

@brendanzab
Copy link
Member

This should possibly be covered by #6220

@Kimundi
Copy link
Member

Kimundi commented May 14, 2013

I think this is because rustc always reads literals as (u)int, and allows silent overflow for types with fewer bits

@catamorphism
Copy link
Contributor

Dup of #4220

flip1995 pushed a commit to flip1995/rust that referenced this issue Dec 20, 2020
…=ebroto

cargo dev fmt: don't format entire rustc repo if we ran ra_setup previously

It turns out that rustfmt sees a rustc repo that we pulled in as path dependency via `cargo dev ra-setup` as part of the tree and would try to format it :D

Of course we don't want this, so skip formatting if we see that we ran `ra-setup` previously.

changelog: none
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

4 participants