Skip to content

Rollup of 7 pull requests - #68975

Merged
bors merged 18 commits into
rust-lang:masterfrom
Dylan-DPC-zz:rollup-jzab8oh
Feb 9, 2020
Merged

Rollup of 7 pull requests#68975
bors merged 18 commits into
rust-lang:masterfrom
Dylan-DPC-zz:rollup-jzab8oh

Conversation

@Dylan-DPC-zz

Copy link
Copy Markdown

Successful merges:

Failed merges:

r? @ghost

ssomersand others added 18 commits February 4, 2020 22:35
It's tautological, and Rust-specific Jargon.
This changes various Option/Result methods to consistently describe unwrapping
behavior using the words "return", "contain", "consume".
It also renames the closure argument of `Return::unwrap_or_else` to `default` to
be consistent with `Option`.
For noww, librustc_hir re-exports the `def_id` module from
librustc_span, so the rest of rustc can continue to reference
rustc_hir::def_id
…ochenkov
Move `rustc_hir::def_id` to `rustc_span::def_id`
This will allow `HygieneData` to refer to `DefId` and `DefIndex`, which
will enable proper serialization of Span hygiene information.
This also reduces the number of things imported from `rustc_hir`, which
might make it easier to remove dependencies on it.
…r=KodrAus
Fix and test implementation of BTreeMap's first/last_entry, pop_first/last
Properly implement and test `first_entry` & `last_entry` to fix problem report rust-lang#68829
perf: Reduce Vec allocations in normalization by passing &mut Vec
Complicates the code a bit but allocation/freeing were a few percent of the overall runtime in trait heavy code.
Don't use the word "unwrap" to describe "unwrap" methods
It's tautological, and "unwrap" is essentially Rust-specific jargon.
I was teaching a newbie some Rust, and doing the usual hand-waving about error handling using unwrap. They asked what 'unwrap' means. I said look it up in the docs. The docs read (paraphrased) "unwrap unwraps". I was embarrassed.
This changes all the Option/Result functions with unwrapping behavior to use a variation on a single description:
> "Returns the contained `Some/Ok` value [or ...]."
It also renames the closure of `Result::unwrap_or_else` to `default` for consistency with `Option`, and perhaps makes a few other small tweaks.
Previous: rust-lang#68849
Mark several functions and methods in core::cmp as #[must_use]
These functions and methods aren't mutating functions and ignoring the result of them is likely a bug in the user's code.
…, r=Dylan-DPC
Clean up E0277 and E0282 explanations
r? @Dylan-DPC
codegen: misc cleanups around debuginfo scopes and locations.
See each commit message. Most of these seem to be leftovers from the transition to MIR codegen.
r? @nagisa cc @bjorn3
@Dylan-DPC-zz

Copy link
Copy Markdown
Author

@bors r+ rollup=never p=7

@bors

bors commented Feb 8, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 9dabf80 has been approved by Dylan-DPC

@borsbors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Feb 8, 2020
@Dylan-DPC-zzDylan-DPC-zz added the rollup A PR which is a rollup label Feb 8, 2020
@bors

bors commented Feb 9, 2020

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 9dabf80 with merge 2fd049c...

bors added a commit that referenced this pull request Feb 9, 2020
Rollup of 7 pull requests
Successful merges:
- #68718 (Move `rustc_hir::def_id` to `rustc_span::def_id`)
- #68834 (Fix and test implementation of BTreeMap's first/last_entry, pop_first/last)
- #68857 (perf: Reduce Vec allocations in normalization by passing &mut Vec)
- #68918 (Don't use the word "unwrap" to describe "unwrap" methods)
- #68946 (Mark several functions and methods in core::cmp as #[must_use])
- #68958 (Clean up E0277 and E0282 explanations)
- #68960 (codegen: misc cleanups around debuginfo scopes and locations.)
Failed merges:
r? @ghost
@bors

bors commented Feb 9, 2020

Copy link
Copy Markdown
Collaborator

💔 Test failed - checks-azure

@borsbors 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 Feb 9, 2020
@Dylan-DPC-zz

Copy link
Copy Markdown
Author

Looks spurious

@bors retry

@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 Feb 9, 2020
@bors

bors commented Feb 9, 2020

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 9dabf80 with merge 6dff769...

bors added a commit that referenced this pull request Feb 9, 2020
Rollup of 7 pull requests
Successful merges:
- #68718 (Move `rustc_hir::def_id` to `rustc_span::def_id`)
- #68834 (Fix and test implementation of BTreeMap's first/last_entry, pop_first/last)
- #68857 (perf: Reduce Vec allocations in normalization by passing &mut Vec)
- #68918 (Don't use the word "unwrap" to describe "unwrap" methods)
- #68946 (Mark several functions and methods in core::cmp as #[must_use])
- #68958 (Clean up E0277 and E0282 explanations)
- #68960 (codegen: misc cleanups around debuginfo scopes and locations.)
Failed merges:
r? @ghost
@bors

bors commented Feb 9, 2020

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-azure
Approved by: Dylan-DPC
Pushing 6dff769 to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Feb 9, 2020
@bors
bors merged commit 9dabf80 into rust-lang:masterFeb 9, 2020
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.rollupA PR which is a rollupS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants

@Dylan-DPC-zz@bors@ssomers@brson@GuillaumeGomez@eddyb@mjbshaw@Marwes@Aaron1011@Dylan-DPC