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

Suggest Rust 2018 on `<expr>.await` with no such field #63539

Merged
merged 8 commits into from Aug 16, 2019

Conversation

@Centril
Copy link
Member

commented Aug 14, 2019

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

@oli-obk

This comment has been minimized.

Copy link
Contributor

commented Aug 15, 2019

@bors r+

r? @oli-obk

@bors

This comment has been minimized.

Copy link
Contributor

commented Aug 15, 2019

📌 Commit 9287eb6 has been approved by oli-obk

@rust-highfive rust-highfive assigned oli-obk and unassigned varkor Aug 15, 2019

Centril added a commit to Centril/rust that referenced this pull request Aug 15, 2019

Rollup merge of rust-lang#63539 - Centril:2015.await, r=oli-obk
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

Centril added a commit to Centril/rust that referenced this pull request Aug 15, 2019

Rollup merge of rust-lang#63539 - Centril:2015.await, r=oli-obk
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

bors added a commit that referenced this pull request Aug 15, 2019

Auto merge of #63603 - Centril:rollup-sdtmwk7, r=Centril
Rollup of 8 pull requests

Successful merges:

 - #63173 (Use libunwind from llvm-project submodule for musl targets)
 - #63462 (Opaque builtin derive macros)
 - #63470 (Utilize -Zbinary-dep-depinfo in rustbuild)
 - #63505 (Hash the remapped sysroot instead of the original.)
 - #63539 (Suggest Rust 2018 on `<expr>.await` with no such field)
 - #63545 (Feature gate 'yield $expr?' pre-expansion)
 - #63548 (Update rustc-demangle to 0.1.16.)
 - #63584 (libcore: more cleanups using `#![feature(associated_type_bounds)]`)

Failed merges:

r? @ghost

Centril added a commit to Centril/rust that referenced this pull request Aug 15, 2019

Rollup merge of rust-lang#63539 - Centril:2015.await, r=oli-obk
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

Centril added a commit to Centril/rust that referenced this pull request Aug 15, 2019

Rollup merge of rust-lang#63539 - Centril:2015.await, r=oli-obk
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

bors added a commit that referenced this pull request Aug 15, 2019

Auto merge of #63607 - Centril:rollup-yry7nsw, r=Centril
Rollup of 5 pull requests

Successful merges:

 - #63173 (Use libunwind from llvm-project submodule for musl targets)
 - #63462 (Opaque builtin derive macros)
 - #63539 (Suggest Rust 2018 on `<expr>.await` with no such field)
 - #63545 (Feature gate 'yield $expr?' pre-expansion)
 - #63584 (libcore: more cleanups using `#![feature(associated_type_bounds)]`)

Failed merges:

r? @ghost

Centril added a commit to Centril/rust that referenced this pull request Aug 15, 2019

Rollup merge of rust-lang#63539 - Centril:2015.await, r=oli-obk
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

bors added a commit that referenced this pull request Aug 15, 2019

Auto merge of #63610 - Centril:rollup-et2mw15, r=Centril
Rollup of 7 pull requests

Successful merges:

 - #63462 (Opaque builtin derive macros)
 - #63470 (Utilize -Zbinary-dep-depinfo in rustbuild)
 - #63539 (Suggest Rust 2018 on `<expr>.await` with no such field)
 - #63545 (Feature gate 'yield $expr?' pre-expansion)
 - #63548 (Update rustc-demangle to 0.1.16.)
 - #63559 (rustc_codegen_utils: account for 1-indexed anonymous lifetimes in v0 mangling.)
 - #63584 (libcore: more cleanups using `#![feature(associated_type_bounds)]`)

Failed merges:

r? @ghost

Centril added a commit to Centril/rust that referenced this pull request Aug 15, 2019

Rollup merge of rust-lang#63539 - Centril:2015.await, r=oli-obk
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

bors added a commit that referenced this pull request Aug 15, 2019

Auto merge of #63611 - Centril:rollup-rpuz20q, r=Centril
Rollup of 3 pull requests

Successful merges:

 - #63535 (Continue refactoring resolve and hygiene)
 - #63539 (Suggest Rust 2018 on `<expr>.await` with no such field)
 - #63584 (libcore: more cleanups using `#![feature(associated_type_bounds)]`)

Failed merges:

 - #63545 (Feature gate 'yield $expr?' pre-expansion)

r? @ghost

Centril added a commit to Centril/rust that referenced this pull request Aug 15, 2019

Rollup merge of rust-lang#63539 - Centril:2015.await, r=oli-obk
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

bors added a commit that referenced this pull request Aug 15, 2019

Auto merge of #63617 - Centril:rollup-zqsuhyy, r=Centril
Rollup of 7 pull requests

Successful merges:

 - #62593 (Group all ABI tests.)
 - #63487 (Remove meaningless comments in src/test)
 - #63535 (Continue refactoring resolve and hygiene)
 - #63539 (Suggest Rust 2018 on `<expr>.await` with no such field)
 - #63584 (libcore: more cleanups using `#![feature(associated_type_bounds)]`)
 - #63612 (Do not suggest `try_into` for base types inside of macro expansions)
 - #63615 (Fix typo in DoubleEndedIterator::nth_back doc)

Failed merges:

r? @ghost

Centril added a commit to Centril/rust that referenced this pull request Aug 16, 2019

Rollup merge of rust-lang#63539 - Centril:2015.await, r=oli-obk
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

bors added a commit that referenced this pull request Aug 16, 2019

Auto merge of #63627 - Centril:rollup-v8i7x5i, r=Centril
Rollup of 7 pull requests

Successful merges:

 - #62593 (Group all ABI tests.)
 - #63173 (Use libunwind from llvm-project submodule for musl targets)
 - #63535 (Continue refactoring resolve and hygiene)
 - #63539 (Suggest Rust 2018 on `<expr>.await` with no such field)
 - #63584 (libcore: more cleanups using `#![feature(associated_type_bounds)]`)
 - #63612 (Do not suggest `try_into` for base types inside of macro expansions)
 - #63615 (Fix typo in DoubleEndedIterator::nth_back doc)

Failed merges:

r? @ghost
@bors

This comment has been minimized.

Copy link
Contributor

commented Aug 16, 2019

☔️ The latest upstream changes (presumably #63627) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors merged commit 9287eb6 into rust-lang:master Aug 16, 2019

4 checks passed

pr Build #20190814.1 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-6.0) Linux x86_64-gnu-llvm-6.0 succeeded
Details
pr (LinuxTools) LinuxTools succeeded
Details

@Centril Centril deleted the Centril:2015.await branch Aug 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.