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 3 pull requests #64491

Merged
merged 12 commits into from
Sep 16, 2019
Merged

Rollup of 3 pull requests #64491

merged 12 commits into from
Sep 16, 2019

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Sep 15, 2019

Successful merges:

Failed merges:

r? @ghost

marmistrz and others added 12 commits August 25, 2019 00:09
Fixes an issue where we did not nest tables correctly when resolving
associated types in formal argument/return type positions
Performance shouldn't be impacted (see [1] for a perf run) and this
should allow us to catch more bugs, e.g. [2] and [3].

[1]: rust-lang#64262
[2]: rust-lang#64250
[3]: rust-lang#57298
...since the code is literally the same and does the same thing.
This is not perfectly correct as `#[attr] (5)` will still not lint, but
it does seem good enough, in particular as the parentheses in that case
are not unambiguously incorrect.
Document platform-specific behavior of the iterator returned by std::fs::read_dir
… r=varkor

save-analysis: Nest typeck tables when processing functions/methods

Fixes an issue where we did not nest tables correctly when resolving
associated types in formal argument/return type positions.

This was the minimized reproduction case that I tested the fix on:
```rust
pub trait Trait {
    type Assoc;
}

pub struct A;

pub fn func() {
    fn _inner1<U: Trait>(_: U::Assoc) {}
    fn _inner2<U: Trait>() -> U::Assoc { unimplemented!() }

    impl A {
        fn _inner1<U: Trait>(self, _: U::Assoc) {}
        fn _inner2<U: Trait>(self) -> U::Assoc { unimplemented!() }
    }
}
```
using `debug_assertions`-enabled rustc and by additionally passing `-Zsave-analysis`.

Unfortunately the original assertion fired is a *debug* one and from what I can tell we don't run the tests with these on, so I'm not adding a test here. If I missed it and there is a way to run tests with these on, I'd love to add a test case for this.

Closes rust-lang#63663
Closes rust-lang#50328
Closes rust-lang#43982
… r=varkor

Don't mark expression with attributes as not needing parentheses

This is not perfectly correct as `#[attr] (5)` will still not lint, but it does seem good enough, in particular as the parentheses in that case are not unambiguously incorrect; I might personally prefer to see them for clarity.

Fixes rust-lang#43279.
@Centril
Copy link
Contributor Author

Centril commented Sep 15, 2019

@bors r+ p=3 rollup=never

@bors
Copy link
Contributor

bors commented Sep 15, 2019

📌 Commit 0592d13 has been approved by Centril

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Sep 15, 2019
@bors
Copy link
Contributor

bors commented Sep 15, 2019

⌛ Testing commit 0592d13 with merge 06c94ee...

bors added a commit that referenced this pull request Sep 15, 2019
Rollup of 3 pull requests

Successful merges:

 - #63872 (Document platform-specific behavior of the iterator returned by std::fs::read_dir)
 - #64250 (save-analysis: Nest typeck tables when processing functions/methods)
 - #64472 (Don't mark expression with attributes as not needing parentheses)

Failed merges:

r? @ghost
@bors
Copy link
Contributor

bors commented Sep 16, 2019

☀️ Test successful - checks-azure
Approved by: Centril
Pushing 06c94ee to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 16, 2019
@bors bors merged commit 0592d13 into rust-lang:master Sep 16, 2019
@Centril Centril deleted the rollup-21wkl69 branch September 16, 2019 00:17
@Centril Centril added the rollup A PR which is a rollup label Oct 2, 2019
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants