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 #63611

Closed
wants to merge 28 commits into from
Closed

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Aug 15, 2019

Successful merges:

Failed merges:

r? @ghost

Centril and others added 28 commits August 13, 2019 23:54
…::root()`

For consistency with `ExpnId::root`.

Also introduce a helper `Span::with_root_ctxt` for creating spans with `SyntaxContext::root()` context
`Ident` has had a full span rather than just a `SyntaxContext` for a long time now.
The expansion info is not optional and should always exist
Traces already contain module info without that.
It's easy to forget to call `finalize_*` on a module.
In particular, macros enum and trait modules weren't finalized.
By happy accident macros weren't placed into those modules until now.
The previous approach was brittle - what would happen if `ParentScope` wasn't created by `invoc_parent_scope`?
That's exactly the case for various uses of `ParentScope` in diagnostics and in built-in attribute validation.
Remove some unnecessary parameters from functions
It was very similar to `ParentScope` and mostly could be replaced by it.
By allocating its derive paths on the resolver arena.
It was introduced to avoid going through `hygiene_data`, but now it's read only once, when `ParseSess` is created, so going through a lock is ok.
For naming consistency with everything else in this area
Continue refactoring resolve and hygiene

The general goal is addressing FIXMEs from the previous PRs.

Merging similar data structures (+ prerequisites for such merging), accounting for the fact that all `ExpnId`s have associated data in `HygieneData` now (less `Option`s).

Also, some renaming.
This should be the last renaming session in this area, I think.

r? @matthewjasper
Suggest Rust 2018 on `<expr>.await` with no such field

When type checking a field projection (`fn check_field`) to `<expr>.await` where `<expr>: τ` and `τ` is not a primitive type, suggest switching to Rust 2018. E.g.

```
error[E0609]: no field `await` on type `std::pin::Pin<&mut dyn std::future::Future<Output = ()>>`
  --> $DIR/suggest-switching-edition-on-await.rs:31:7
   |
LL |     x.await;
   |       ^^^^^ unknown field
   |
   = note: to `.await` a `Future`, switch to Rust 2018
   = help: set `edition = "2018"` in `Cargo.toml`
   = note: for more on editions, read https://doc.rust-lang.org/edition-guide
```

Fixes rust-lang#63533

This PR also performs some preparatory cleanups in `fn check_field`; the last 2 commits are where the suggestion is introduced and tested respectively.

r? @varkor
… r=alexreg

libcore: more cleanups using `#![feature(associated_type_bounds)]`

Turns out this was indeed a bootstrapping issue from a test with `./x.py check` locally after rust-lang#63534 merged.

Closes rust-lang#63393

r? @alexreg
cc @iluuu1994
cc rust-lang#52662
@Centril
Copy link
Contributor Author

Centril commented Aug 15, 2019

@bors r+ p=3 rollup=never

@bors
Copy link
Contributor

bors commented Aug 15, 2019

📌 Commit 6727afd 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 Aug 15, 2019
@Centril
Copy link
Contributor Author

Centril commented Aug 15, 2019

@bors r+ p=3 rollup=never

@bors
Copy link
Contributor

bors commented Aug 15, 2019

💡 This pull request was already approved, no need to approve it again.

@bors
Copy link
Contributor

bors commented Aug 15, 2019

📌 Commit 6727afd has been approved by Centril

@bors
Copy link
Contributor

bors commented Aug 15, 2019

⌛ Testing commit 6727afd with merge 7dd959e79864a1a7d7cc65e7b360559905166018...

@bors
Copy link
Contributor

bors commented Aug 15, 2019

💥 Test timed out

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 15, 2019
@Centril Centril closed this Aug 15, 2019
@Centril Centril deleted the rollup-rpuz20q branch August 15, 2019 22:28
@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 S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants