-
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 5 pull requests #40785
Rollup of 5 pull requests #40785
Conversation
This replaces the `std::collections::hash::table::RevMoveBuckets` iterator with a simpler `while` loop. This iterator was only used for dropping the remaining elements of a `RawTable`, so instead we can just loop through directly and drop them in place. This should be functionally equivalent to the former code, but a little easier to read. I was hoping it might have some performance benefit too, but it seems the optimizer was already good enough to see through the iterator -- the generated code is nearly the same. Maybe it will still help if an element type has more complicated drop code.
Now that we've also updated cargo's release process this commit also changes the download location of Cargo from Cargos archives back to the static.r-l.o archives. This should ensure that the Cargo download is the exact Cargo paired with the rustc that we release.
Allow `use` macro imports to shadow global macros Terminology: - global scope: builtin macros, macros from the prelude, `#[macro_use]`, or `#![plugin(..)]`. - legacy scope: crate-local `macro_rules!`. - modern scope: `use` macro imports, `macro` (once implemented). Today, the legacy scope can shadow the global scope (modulo RFC 1560 expanded shadowing restrictions). However, the modern scope cannot shadow or be shadowed by either the global or legacy scopes, leading to ambiguity errors. This PR allows the modern scope to shadow the global scope (subject to some restrictions). More specifically, a name in the global scope is as shadowable as a glob import in the module `self`. In other words, we imagine a special, implicit glob import in each module item: ```rust mod foo { #[lexical_only] // Not accessible via `foo::<name>`, like pre-RFC 1560 `use` imports. #[shadowable_by_legacy_scope] // for back-compat use <global_macros>::*; } ``` r? @nrc
rustbuild: Update bootstrap compiler Now that we've also updated cargo's release process this commit also changes the download location of Cargo from Cargos archives back to the static.r-l.o archives. This should ensure that the Cargo download is the exact Cargo paired with the rustc that we release.
Revert rust-lang#39485, fixing type-inference regressions This reverts PR rust-lang#39485, which should fix the immediate regressions. Eventually I'd like to land rust-lang#40224 -- or some variant of it -- which revisits the question fo dead-code and inference. r? @eddyb cc @canndrew
Simplify hash table drops This replaces the `std::collections::hash::table::RevMoveBuckets` iterator with a simpler `while` loop. This iterator was only used for dropping the remaining elements of a `RawTable`, so instead we can just loop through directly and drop them in place. This should be functionally equivalent to the former code, but a little easier to read. I was hoping it might have some performance benefit too, but it seems the optimizer was already good enough to see through the iterator -- the generated code is nearly the same. Maybe it will still help if an element type has more complicated drop code.
…labnik Fix markdown links to pdqsort r? @alexcrichton
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @arielb1 (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
@bors r+ p=10 |
📌 Commit b8fbc64 has been approved by |
⌛ Testing commit b8fbc64 with merge 98a31cc... |
💔 Test failed - status-travis |
Uhhh spurious I guess? @bors retry |
💔 Test failed - status-travis |
|
I've classified both those failures under #40474 |
use
macro imports to shadow global macros #40501, rustbuild: Update bootstrap compiler #40524, Revert #39485, fixing type-inference regressions #40636, Simplify hash table drops #40739, Fix markdown links to pdqsort #40756