diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-08-16 08:26:38 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-16 08:26:38 +0200 |
| commit | d9a429a1eb42ba56e1fa770c90305011efcac4d6 (patch) | |
| tree | 90c9b00e6f322de3acc011afafcf86b2301c94a1 /src/libsyntax/parse/parser | |
| parent | 6e9e6ea39bbc2c9e58cdc854c55dfc1487a77ae1 (diff) | |
| parent | 9287eb647f7168a65950965044bd5e22d1b05faf (diff) | |
| download | rust-d9a429a1eb42ba56e1fa770c90305011efcac4d6.tar.gz rust-d9a429a1eb42ba56e1fa770c90305011efcac4d6.zip | |
Rollup merge of #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 https://github.com/rust-lang/rust/issues/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
Diffstat (limited to 'src/libsyntax/parse/parser')
0 files changed, 0 insertions, 0 deletions
