-
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 8 pull requests #68971
Rollup of 8 pull requests #68971
Conversation
Also turns a few `box` into `Box::new`
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`.
This reduces the number of `associated_item` queries done here.
Quickly skip impls that do not define any items with the same name
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
Remove unused feature gates I think many of the remaining unstable things can be easily be replaced with stable things. I have kept the `#![feature(nll)]` even though it is only necessary in `libstd`, to make regressions of it harder.
…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.
…=petrochenkov Speed up the inherent impl overlap check This gives a ~7% improvement in compile times for the stm32f0(x2) crate. Also addresses @eddyb's comment in rust-lang#68837 (comment).
Pretty-print generic params and where clauses on associated types closes rust-lang#67509
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+ p=8 rollup=never |
📌 Commit 2737732 has been approved by |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Successful merges:
rustc_hir::def_id
torustc_span::def_id
#68718 (Moverustc_hir::def_id
torustc_span::def_id
)Failed merges:
r? @ghost