-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
A few cleanups and minor improvements to typeck/check #54533
Merged
Merged
Conversation
This file contains 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
r? @davidtwco (rust_highfive has picked a reviewer for you, use r? to override) |
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Sep 24, 2018
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Sep 24, 2018
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
bors
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Sep 25, 2018
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Sep 25, 2018
This comment has been minimized.
This comment has been minimized.
bors
added
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Sep 25, 2018
ljedrz
force-pushed
the
cleanup_librustc_typeck_check
branch
from
September 26, 2018 08:05
809659b
to
db69d47
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
ljedrz
force-pushed
the
cleanup_librustc_typeck_check
branch
from
September 26, 2018 09:00
db69d47
to
3ed773a
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
labels
Sep 26, 2018
This comment has been minimized.
This comment has been minimized.
bors
added
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Sep 26, 2018
kennytm
added a commit
to kennytm/rust
that referenced
this pull request
Sep 27, 2018
…davis A few cleanups and minor improvements to typeck This PR complements rust-lang#54533, which was limited to `check`. - change a few `push` loops to `extend`s - prefer `to_owned` to `to_string` for string literals - prefer `if let` to `match` where only one branch matters - a few other minor improvements - whitespace fixes
ljedrz
force-pushed
the
cleanup_librustc_typeck_check
branch
from
September 27, 2018 08:18
3ed773a
to
3527276
Compare
Rebased. |
@bors r+ |
📌 Commit 3527276 has been approved by |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
labels
Sep 27, 2018
bors
added a commit
that referenced
this pull request
Sep 27, 2018
A few cleanups and minor improvements to typeck/check - turn a `loop` into a `while let` - turn a `push_back` loop into an `extend` - turn a few `push` loops into collected iterators - prefer `vec![x; n]` to `(0..n).map(|_| x).collect()` - combine two loops doing the same thing on 2 data sets using `chain` - use `unwrap_or` where applicable and readable - add a `potentially_plural_count` helper function to simplify several `format!()` calls - prefer `to_owned` to `to_string` for string literals - change `match` to `if let` where only one branch matters - a few other minor improvements - whitespace fixes
☀️ Test successful - status-appveyor, status-travis |
bors
added a commit
that referenced
this pull request
Sep 29, 2018
A few cleanups and minor improvements to typeck This PR complements #54533, which was limited to `check`. - change a few `push` loops to `extend`s - prefer `to_owned` to `to_string` for string literals - prefer `if let` to `match` where only one branch matters - a few other minor improvements - whitespace fixes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
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.
loop
into awhile let
push_back
loop into anextend
push
loops into collected iteratorsvec![x; n]
to(0..n).map(|_| x).collect()
chain
unwrap_or
where applicable and readablepotentially_plural_count
helper function to simplify severalformat!()
callsto_owned
toto_string
for string literalsmatch
toif let
where only one branch matters