Skip to content
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

Closed
wants to merge 12 commits into from
Closed

Rollup of 5 pull requests #40785

wants to merge 12 commits into from

Conversation

jseyfried and others added 12 commits March 20, 2017 00:04
… r=nikomatsakis"

This reverts commit dc0bb3f, reversing
changes made to e879aa4.

This is a temporary step intended to fix regressions. A more
comprehensive fix for type inference and dead-code is in the works.
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.
@rust-highfive
Copy link
Collaborator

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.

@frewsxcv
Copy link
Member Author

@bors r+ p=10

@bors
Copy link
Contributor

bors commented Mar 24, 2017

📌 Commit b8fbc64 has been approved by frewsxcv

@bors
Copy link
Contributor

bors commented Mar 24, 2017

⌛ Testing commit b8fbc64 with merge 98a31cc...

@bors
Copy link
Contributor

bors commented Mar 24, 2017

💔 Test failed - status-travis

@frewsxcv
Copy link
Member Author

[00:51:19] error: unable to get packages from source

Uhhh spurious I guess?

@bors retry

@bors
Copy link
Contributor

bors commented Mar 24, 2017

⌛ Testing commit b8fbc64 with merge 8789360...

bors added a commit that referenced this pull request Mar 24, 2017
Rollup of 5 pull requests

- Successful merges: #40501, #40524, #40636, #40739, #40756
- Failed merges:
@bors
Copy link
Contributor

bors commented Mar 24, 2017

💔 Test failed - status-travis

@arielb1
Copy link
Contributor

arielb1 commented Mar 24, 2017


[00:55:24] error: unable to get packages from source
[00:55:24] 
[00:55:24] Caused by:
[00:55:24]   failed to parse manifest at `/cargo/registry/src/github.com-1ecc6299db9ec823/url-0.5.7/Cargo.toml`
[00:55:24] 
[00:55:24] Caused by:
[00:55:24]   could not parse input as TOML
[00:55:24] 
[00:55:24] Caused by:
[00:55:24]   expected newline, found an identifier at line 14
[00:55:24] thread 'main' panicked at 'tests failed for https://github.com/iron/iron', /checkout/src/tools/cargotest/main.rs:98
[00:55:24] note: Run with `RUST_BACKTRACE=1` for a backtrace.

@frewsxcv frewsxcv closed this Mar 24, 2017
@frewsxcv frewsxcv deleted the rollup branch March 24, 2017 12:49
@alexcrichton
Copy link
Member

I've classified both those failures under #40474

@Centril Centril added the rollup A PR which is a rollup label Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants