Skip to content

type limit comparisons should be conservative with respect to uint #6130

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
nikomatsakis opened this issue Apr 30, 2013 · 0 comments
Closed

Comments

@nikomatsakis
Copy link
Contributor

The following code:

            assert!(v <= 0xFFFF_FFFF_u);

issues a warning on a 32-bit build but not a 64-bit build (because v is a uint). This is annoying. We should consider uint to be 64-bits for the purposes of this lint mode, which is inline with our general philosophy that you of segregating uint from u32 and u64 to encourage portability between 32-bit and 64-bit.

@brson brson closed this as completed in aa179cb May 18, 2013
bors added a commit to rust-lang-ci/rust that referenced this issue Oct 24, 2020
Rename tables to typecheck_result()

While working on rust-lang#6130, I noticed that part of the documentation was updated to use `LateContext::typeck_results`, but the paragraph still referred to the old `tables` field of `LateContext`.

---

*Please keep the line below*
changelog: none
bors added a commit to rust-lang-ci/rust that referenced this issue Oct 24, 2020
New lint: Recommend using `ptr::eq` when possible

This is based almost entirely on the code available in the previous PR rust-lang#4596. I merely updated the code to make it compile.

Fixes rust-lang#3661.

- [ ] I'm not sure about the lint name, but it was the one used in the original PR.
- [X] Added passing UI tests (including committed `.stderr` file)
- [X] `cargo test` passes locally
- [X] Executed `cargo dev update_lints`
- [X] Added lint documentation
- [X] Run `cargo dev fmt`

---

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

1 participant