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 15 pull requests #48510

Merged
merged 47 commits into from
Feb 24, 2018
Merged

Rollup of 15 pull requests #48510

merged 47 commits into from
Feb 24, 2018

Conversation

Zoxc and others added 30 commits February 10, 2018 00:29
Previously, "_1" was not marked as "definitely uninitialized" after a "switchInt(move _1)" terminator.

Related discussion: https://internals.rust-lang.org/t/why-is-2-definitely-initialized-after-switchint-move-2/6760
Closes rust-lang#47981

This is pretty unsatisfying since it is working around a span bug. However, I can't track down the span bug and it could be in the parser, proc macro expansion, the user macro, or Syn (or any other library that can manipulate spans). Given that user code can cause this error, I think we need to be more robust here.
Extend `Termination` trait with a method to determine what happens
with a unit test.

This commit incorporates work by Bastian Köcher <[email protected]>.
Also make `std::termination` module public and rename feature.

The lib feature needs a different name from the language feature.
src/rfc-1937-termination-trait/termination-trait-for-result-box-error_ok.rs
@Manishearth
Copy link
Member Author

(investigating)

…atsakis

Error on nested impl Trait and path projections from impl Trait

cc rust-lang#34511

r? @nikomatsakis
…ests, r=eddyb

Termination trait in tests

Support the `Termination` trait in unit tests (cc rust-lang#43301)

Also, a drive-by fix for rust-lang#47075.

This is joint work with @bkchr.
…coding, r=nikomatsakis

incr.comp.: Don't keep RefCells in on-disk-cache borrowed in order to allow for recursive invocations.

Fixes rust-lang#47972.

r? @nikomatsakis
…komatsakis

incr.comp.: Store DepNode colors in a dense array instead of a hashmap.

Implements half of rust-lang#47293.

r? @nikomatsakis
mir: Gather move at SwitchInt, Assert terminators

Previously, `_1` was not marked as "definitely uninitialized" after a `switchInt(move _1)` terminator.

I think the same goes for the `assert` terminator.

Related discussion: https://internals.rust-lang.org/t/why-is-2-definitely-initialized-after-switchint-move-2/6760
Avoid ICE in arg mistmatch error for tuple variants

Fix rust-lang#47706.
save-analysis: power through bracket mis-counts

Closes rust-lang#47981

This is pretty unsatisfying since it is working around a span bug. However, I can't track down the span bug and it could be in the parser, proc macro expansion, the user macro, or Syn (or any other library that can manipulate spans). Given that user code can cause this error, I think we need to be more robust here.

r? @eddyb
…ebank

unused_unsafe: don't label irrelevant fns

Fixes rust-lang#48131

Diagnostic bugfix to remove an errant note.  Stops the search for an enclosing unsafe scope at the first safe fn encountered.

```rust
pub unsafe fn outer() {
    fn inner() {
        unsafe { /* unnecessary */ }
    }

    inner()
}
```

**Before:**

```
warning: unnecessary `unsafe` block
 --> src/main.rs:3:9
  |
1 | pub unsafe fn outer() {
  | --------------------- because it's nested under this `unsafe` fn
2 |     fn inner() {
3 |         unsafe { /* unnecessary */ }
  |         ^^^^^^ unnecessary `unsafe` block
  |
  = note: #[warn(unused_unsafe)] on by default
```

**After:**

```
warning: unnecessary `unsafe` block
 --> src/main.rs:3:9
  |
3 |         unsafe { /* unnecessary */ }
  |         ^^^^^^ unnecessary `unsafe` block
  |
  = note: #[warn(unused_unsafe)] on by default
```
…fid, r=eddyb

Allow for instantiating statics from upstream crates

This PR makes the infrastructure around translating statics a bit more flexible so that it can also instantiate statics from upstream crates if the need arises. This is preparatory work for a MIR-only RLIBs prototype, where the instantiation of a `static` may be deferred until a leaf crate.

r? @eddyb (feel free to assign to someone else if you're busy)
…ikomatsakis

When encountering invalid token after `unsafe`, mention `{`

Fix rust-lang#37158.
@Manishearth
Copy link
Member Author

@bors r+

@bors
Copy link
Contributor

bors commented Feb 24, 2018

📌 Commit 182f882 has been approved by Manishearth

@bors 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 24, 2018
@bors
Copy link
Contributor

bors commented Feb 24, 2018

⌛ Testing commit 182f882 with merge 28a1e4f...

bors added a commit that referenced this pull request Feb 24, 2018
Rollup of 15 pull requests

- Successful merges: #47987, #48056, #48061, #48084, #48143, #48185, #48206, #48208, #48232, #48246, #48258, #48317, #48353, #48356, #48402
- Failed merges:
@bors
Copy link
Contributor

bors commented Feb 24, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: Manishearth
Pushing 28a1e4f to master...

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 S-waiting-on-bors Status: 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.