-
Notifications
You must be signed in to change notification settings - Fork 13k
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 7 pull requests #68975
Merged
Merged
Rollup of 7 pull requests #68975
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
…p_first, pop_last
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
@bors r+ rollup=never p=7 |
📌 Commit 9dabf80 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
Feb 8, 2020
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
💔 Test failed - checks-azure |
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
Feb 9, 2020
Looks spurious @bors retry |
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
Feb 9, 2020
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
☀️ Test successful - checks-azure |
This was referenced Feb 9, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
merged-by-bors
This PR was explicitly merged by bors.
rollup
A PR which is a rollup
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.
Successful merges:
rustc_hir::def_id
torustc_span::def_id
#68718 (Moverustc_hir::def_id
torustc_span::def_id
)Failed merges:
r? @ghost