rust/src/test
Mazdak Farrokhzad 0d0f753955
Rollup merge of #64698 - Centril:infer-const-with-stash, r=estebank
Recover on `const X = 42;` and infer type + Error Stash API

Here we:

1. Introduce a notion of the "error stash".

   This is a map in the `Handler` to which you can `err.stash(...)` away your diagnostics and then steal them in a later "phase" of the compiler (e.g. stash in parser, steal in typeck) to enrich them with more information that isn't available in the previous "phase".

    I believe I've covered all the bases to make sure these diagnostics are actually emitted eventually even under `#[cfg(FALSE)]` but please check my logic.

2. Recover when parsing `[const | static mut?] $ident = $expr;` which has a missing type.

    Use the "error stash" to stash away the error and later steal the error in typeck where we emit the error as `MachineApplicable` with the actual inferred type. This builds on https://github.com/rust-lang/rust/pull/62804.

cc https://github.com/rust-lang/rfcs/pull/2545

r? @estebank
2019-09-24 23:45:24 +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 codegen: use "_N" (like for other locals) instead of "argN", for argument names. 2019-09-13 19:25:05 +03:00
codegen-units
compile-fail Get rid of special const intrinsic query in favour of const_eval 2019-09-17 16:31:55 +02:00
debuginfo fix debuginfo/issue22656 with LLDB 8 2019-09-18 10:42:55 -04:00
incremental Ban non-extern rust intrinsics 2019-09-14 11:47:02 -04:00
mir-opt add a mir-opt test that we don't add the spurious drop 2019-09-19 16:12:48 -04:00
pretty Print visibility of macro items 2019-09-15 10:22:13 +01: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 Rollup merge of #64016 - nnethercote:Compiler-fiddling, r=oli-obk 2019-09-24 23:45:17 +02:00
run-pass-valgrind Remove no-prefer-dynamic from valgrind tests 2019-09-01 10:09:45 -04:00
rustdoc Generate proc macro harness in AST order. 2019-09-17 19:10:10 -04:00
rustdoc-js Improve searching in rustdoc and add tests 2019-09-04 21:27:13 +08:00
rustdoc-js-std Improve searching in rustdoc and add tests 2019-09-04 21:27:13 +08:00
rustdoc-ui rustdoc: fix diagnostic with mixed code block styles 2019-09-07 12:21:32 -07:00
rustfix
ui Rollup merge of #64698 - Centril:infer-const-with-stash, r=estebank 2019-09-24 23:45:24 +02:00
ui-fulldeps Auto merge of #60584 - jonas-schievink:ice-panic-hook, r=oli-obk 2019-09-15 00:10:08 +00:00
COMPILER_TESTS.md doc: fix broken sentence 2019-08-06 02:36:59 +02:00