Minor changes to IndexVec::ensure_contains_elem & related methods#110451
Merged
bors merged 2 commits intorust-lang:masterfrom Apr 19, 2023
Merged
Minor changes to IndexVec::ensure_contains_elem & related methods#110451bors merged 2 commits intorust-lang:masterfrom
IndexVec::ensure_contains_elem & related methods#110451bors merged 2 commits intorust-lang:masterfrom
Conversation
This comment has been minimized.
This comment has been minimized.
cd957ca to
6763e98
Compare
kadiwa4
reviewed
Apr 17, 2023
compiler/rustc_index/src/vec.rs
Outdated
Contributor
There was a problem hiding this comment.
Suggested change
| self.get_mut(index).map(Option::take).unwrap_or(None) | |
| self.get_mut(index)?.take() |
Member
There was a problem hiding this comment.
Agreed, ? looks much nicer than two combinators here.
scottmcm
approved these changes
Apr 17, 2023
Member
scottmcm
left a comment
There was a problem hiding this comment.
r=me, preferably with kadiwa's suggestion.
compiler/rustc_index/src/vec.rs
Outdated
compiler/rustc_index/src/vec.rs
Outdated
Member
There was a problem hiding this comment.
Agreed, ? looks much nicer than two combinators here.
6763e98 to
bd1dfce
Compare
Member
Author
|
@bors r=scottmcm rollup |
Member
Author
|
@bors ping |
Collaborator
Collaborator
|
😪 I'm awake I'm awake |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 19, 2023
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#110432 (Report more detailed reason why `Index` impl is not satisfied) - rust-lang#110451 (Minor changes to `IndexVec::ensure_contains_elem` & related methods) - rust-lang#110476 (Delay a good path bug on drop for `TypeErrCtxt` (instead of a regular delayed bug)) - rust-lang#110498 (Switch to `EarlyBinder` for `collect_return_position_impl_trait_in_trait_tys`) - rust-lang#110507 (boostrap: print output during building tools) - rust-lang#110510 (Fix ICE for transmutability in candidate assembly) - rust-lang#110513 (make `non_upper_case_globals` lint not report trait impls) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This was referenced Jun 13, 2024
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Jun 13, 2024
…, r=scottmcm Small style improvement in `gvn.rs` Allowed by rust-lang#110451 (comment). :P r? `@scottmcm`
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Jun 13, 2024
…, r=scottmcm Small style improvement in `gvn.rs` Allowed by rust-lang#110451 (comment). :P r? ``@scottmcm``
workingjubilee
added a commit
to workingjubilee/rustc
that referenced
this pull request
Jun 13, 2024
…, r=scottmcm Small style improvement in `gvn.rs` Allowed by rust-lang#110451 (comment). :P r? ```@scottmcm```
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jun 14, 2024
Rollup merge of rust-lang#126392 - WaffleLapkin:gvn-style-ish-changes, r=scottmcm Small style improvement in `gvn.rs` Allowed by rust-lang#110451 (comment). :P r? ``@scottmcm``
flip1995
pushed a commit
to flip1995/rust-clippy
that referenced
this pull request
Jun 28, 2024
Small style improvement in `gvn.rs` Allowed by rust-lang/rust#110451 (comment). :P r? ``@scottmcm``
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.
r? @scottmcm