Don't import integer and float modules, use assoc consts 2#70857
Merged
bors merged 9 commits intorust-lang:masterfrom Apr 7, 2020
Merged
Don't import integer and float modules, use assoc consts 2#70857bors merged 9 commits intorust-lang:masterfrom
bors merged 9 commits intorust-lang:masterfrom
Conversation
faern
commented
Apr 6, 2020
src/librustc_typeck/collect.rs
Outdated
Contributor
Author
There was a problem hiding this comment.
This is a user facing change and not just an internal code update. And since we want new code to use the new assoc consts this is important to update to have a consistent message to users.
999bab6 to
029f0ba
Compare
Contributor
Author
|
This still fails an |
029f0ba to
f7778d3
Compare
Contributor
Author
|
Hopefully fixed now. The result of that test came in far sooner than I thought. |
Member
|
@bors r+ |
Collaborator
|
📌 Commit f7778d3 has been approved by |
Centril
added a commit
to Centril/rust
that referenced
this pull request
Apr 7, 2020
…=dtolnay Don't import integer and float modules, use assoc consts 2 Follow up to rust-lang#70777. I missed quite a lot of places. Partially because I wanted to keep the size of the last PR down, and partially because my regexes were not good enough :) r? @dtolnay
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 7, 2020
…ievink Rollup of 5 pull requests Successful merges: - rust-lang#70201 (Small tweaks in ToOwned::clone_into) - rust-lang#70762 (Miri leak check: memory reachable through globals is not leaked) - rust-lang#70846 (Keep codegen units unmerged when building compiler builtins) - rust-lang#70854 (Use assoc int submodules) - rust-lang#70857 (Don't import integer and float modules, use assoc consts 2) Failed merges: r? @ghost
Merged
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this pull request
Apr 21, 2020
Use assoc int consts3 Define module level int consts with associated constants instead of `min_value()` and `max_value()`. So the code become consistent with what the docs recommend etc. Seems natural. Also remove the last usages of the int module constants from this repo (except src/test/ directory which I have still not really done anything in). Some places were missed in the previous PRs because the code uses `crate::<IntTy>` to reach the constants. This is a continuation of rust-lang#70857 r? @dtolnay
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this pull request
Apr 21, 2020
Use assoc int consts3 Define module level int consts with associated constants instead of `min_value()` and `max_value()`. So the code become consistent with what the docs recommend etc. Seems natural. Also remove the last usages of the int module constants from this repo (except src/test/ directory which I have still not really done anything in). Some places were missed in the previous PRs because the code uses `crate::<IntTy>` to reach the constants. This is a continuation of rust-lang#70857 r? @dtolnay
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this pull request
Apr 22, 2020
Use assoc int consts3 Define module level int consts with associated constants instead of `min_value()` and `max_value()`. So the code become consistent with what the docs recommend etc. Seems natural. Also remove the last usages of the int module constants from this repo (except src/test/ directory which I have still not really done anything in). Some places were missed in the previous PRs because the code uses `crate::<IntTy>` to reach the constants. This is a continuation of rust-lang#70857 r? @dtolnay
bors
added a commit
to rust-lang/cargo
that referenced
this pull request
Apr 28, 2020
Use associated constants directly on primitive types instead of modules This PR is in no way critical. It's more of a code cleanup. It comes as a result of me making rust-lang/rust#70857 and search-and-replacing all usage of the soft-deprecated ways of reaching primitive type constants. It makes the code slightly shorter, that's basically it. And showcases the recommended way of reaching these consts on new code :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow up to #70777. I missed quite a lot of places. Partially because I wanted to keep the size of the last PR down, and partially because my regexes were not good enough :)
r? @dtolnay