rust/src/test
Mazdak Farrokhzad d9a429a1eb
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
2019-08-16 08:26:38 +02:00
..
assembly Ignore NVPTX tests 2019-06-12 23:09:08 +02:00
auxiliary rustc_target: avoid negative register counts in the SysV x86_64 ABI. 2019-07-05 13:24:25 +03:00
codegen Add codegen tests for the genericity of fold closures 2019-08-12 15:03:44 -07:00
codegen-units
compile-fail move error with diverging output to compile-fail 2019-08-06 10:28:09 -07:00
debuginfo Fix CDB support tidy check line length failures. 2019-05-20 02:44:26 -07:00
incremental normalize use of backticks in compiler messages for librustc_incremental 2019-07-20 20:57:45 +02:00
mir-opt ignore tests on wasm32-bare 2019-08-15 12:54:56 +02:00
pretty resolve: Remove remaining special cases from built-in macros 2019-08-10 21:50:56 +03:00
run-fail compiletest: Validate pass modes harder 2019-06-16 12:23:22 +03:00
run-make Add very simple edition check to tidy; and add missing edition = 2018s. 2019-07-30 01:56:03 +08:00
run-make-fulldeps Stop test from running on Windows. 2019-08-09 09:24:45 -07:00
run-pass-valgrind Added ignore-sgx for appropriate tests 2019-05-16 14:29:12 -07:00
rustdoc Rollup merge of #62821 - GuillaumeGomez:not-listed-methods, r=Mark-Simulacrum 2019-08-06 15:36:28 +02:00
rustdoc-js
rustdoc-js-std
rustdoc-ui adapt rustdoc to infailable lexer 2019-08-05 13:15:12 +03:00
rustfix
ui Rollup merge of #63539 - Centril:2015.await, r=oli-obk 2019-08-16 08:26:38 +02:00
ui-fulldeps resolve: Remove remaining special cases from built-in macros 2019-08-10 21:50:56 +03:00
COMPILER_TESTS.md doc: fix broken sentence 2019-08-06 02:36:59 +02:00