Skip to content

Minor changes to IndexVec::ensure_contains_elem & related methods - #110451

Merged
bors merged 2 commits into
rust-lang:masterfrom
WaffleLapkin:ensure_return_elem
Apr 19, 2023
Merged

Minor changes to IndexVec::ensure_contains_elem & related methods#110451
bors merged 2 commits into
rust-lang:masterfrom
WaffleLapkin:ensure_return_elem

Conversation

@WaffleLapkin

Copy link
Copy Markdown
Member

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 17, 2023
@rust-log-analyzer

This comment has been minimized.

Comment threadcompiler/rustc_index/src/vec.rs Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self.get_mut(index).map(Option::take).unwrap_or(None)
self.get_mut(index)?.take()

@scottmcmscottmcmApr 17, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, ? looks much nicer than two combinators here.

@scottmcmscottmcm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me, preferably with kadiwa's suggestion.

Comment threadcompiler/rustc_index/src/vec.rs Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice change!

Comment threadcompiler/rustc_index/src/vec.rs Outdated

@scottmcmscottmcmApr 17, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, ? looks much nicer than two combinators here.

@WaffleLapkin

Copy link
Copy Markdown
MemberAuthor

@bors r=scottmcm rollup

@WaffleLapkin

Copy link
Copy Markdown
MemberAuthor

@bors ping

@bors

bors commented Apr 18, 2023

Copy link
Copy Markdown
Collaborator

📌 Commit bd1dfce has been approved by scottmcm

It is now in the queue for this repository.

@borsbors 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 Apr 18, 2023
@bors

bors commented Apr 18, 2023

Copy link
Copy Markdown
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
@bors
bors merged commit a184557 into rust-lang:masterApr 19, 2023
@rustbotrustbot added this to the 1.71.0 milestone Apr 19, 2023
@WaffleLapkin
WaffleLapkin deleted the ensure_return_elem branch April 21, 2023 17:41
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
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@WaffleLapkin@rust-log-analyzer@bors@scottmcm@kadiwa4@rustbot