-
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
Rollup of 6 pull requests #69759
Closed
Closed
Rollup of 6 pull requests #69759
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
PR rust-lang#69562, which fixed a bug that was causing clippy to ICE, passed the place for the *result* of `Rvalue::Discriminant` instead of the *operand* to `apply_discriminant_switch_effect`. As a result, no effect was applied at all, and we lost the perf benefits from marking inactive enum variants as uninitialized.
For all of the methods that pick off the first or last element, we can use subslice patterns to implement them directly, rather than relying on deeper indexing function calls. At a minimum, this means the generated code will rely less on inlining for performance, but in some cases it also optimizes better.
Use .next() instead of .nth(0) on iterators.
Rename DefKind::Method and TraitItemKind::Method r? @eddyb, @Centril, or @matthewjasper cc rust-lang#69498 rust-lang#60163
…t, r=oli-obk Pass correct place to `discriminant_switch_effect` PR rust-lang#69562, which fixed a bug that was causing clippy to ICE, mistakenly passed the place holding the *result* of `Rvalue::Discriminant` instead of the place holding its *operand* to `apply_discriminant_switch_effect` as the enum place. As a result, no effect was applied at all, and we lost the perf benefits from marking inactive enum variants as uninitialized. **edit:** The regression test has been split into rust-lang#69744. r? @oli-obk
Use subslice patterns in slice methods For all of the methods that pick off the first or last element, we can use subslice patterns to implement them directly, rather than relying on deeper indexing function calls. At a minimum, this means the generated code will rely less on inlining for performance, but in some cases it also optimizes better.
…i-obk Make PlaceRef take just one lifetime r? @eddyb
Avoid using `unwrap()` in suggestions Addresses rust-lang#69725, still need a regression test. r? @estebank
@bors r+ p=6 rollup=never |
📌 Commit 7f53c32 has been approved by |
bors
added
the
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
label
Mar 6, 2020
bors
added a commit
that referenced
this pull request
Mar 6, 2020
Rollup of 6 pull requests Successful merges: - #69656 (Use .next() instead of .nth(0) on iterators.) - #69674 (Rename DefKind::Method and TraitItemKind::Method ) - #69676 (Pass correct place to `discriminant_switch_effect`) - #69706 (Use subslice patterns in slice methods) - #69714 (Make PlaceRef take just one lifetime) - #69727 (Avoid using `unwrap()` in suggestions) Failed merges: - #69589 (ast: `Mac`/`Macro` -> `MacCall`) - #69680 (rustc_expand: Factor out `Annotatable::into_tokens` to a separate method) r? @ghost
#69676 was marked as |
Damn it... included the wrong PR, I'll recreate this one. |
@bors retry r- |
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
Mar 6, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
rollup
A PR which is a rollup
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
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.
Successful merges:
discriminant_switch_effect
#69676 (Pass correct place todiscriminant_switch_effect
)unwrap()
in suggestions #69727 (Avoid usingunwrap()
in suggestions)Failed merges:
Mac
/Macro
->MacCall
#69589 (ast:Mac
/Macro
->MacCall
)Annotatable::into_tokens
to a separate method #69680 (rustc_expand: Factor outAnnotatable::into_tokens
to a separate method)r? @ghost