rust/compiler
bors 0fb00251a5 Auto merge of #78662 - sexxi-goose:add_expr_id_to_delegate, r=nikomatsakis
Provide diagnostic suggestion in ExprUseVisitor Delegate

The [Delegate trait](981346fc07/compiler/rustc_typeck/src/expr_use_visitor.rs (L28-L38)) currently use `PlaceWithHirId` which is composed of Hir `Place` and the
corresponding expression id.

Even though this is an accurate way of expressing how a Place is used,
it can cause confusion during diagnostics.

Eg:

```
let arr : [String; 5];

let [a, ...]     =   arr;
 ^^^ E1 ^^^      =  ^^E2^^
 ```

 Here `arr` is moved because of the binding created E1. However, when we
 point to E1 in diagnostics with the message `arr` was moved, it can be
 confusing.  Rather we would like to report E2 to the user.

 Closes: https://github.com/rust-lang/project-rfc-2229/issues/20

r? `@ghost`
2020-11-04 22:45:15 +00:00
..
rustc
rustc_apfloat
rustc_arena Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
rustc_ast Rollup merge of #78376 - Aaron1011:feature/consistent-empty-expr, r=petrochenkov 2020-11-03 15:27:03 +09:00
rustc_ast_lowering Implement rustc side of report-future-incompat 2020-10-30 20:02:14 -04:00
rustc_ast_passes Fix typos 2020-10-29 16:51:46 +01:00
rustc_ast_pretty Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
rustc_attr Improve deprecation attribute diagnostic messages. 2020-11-02 13:21:18 +01:00
rustc_builtin_macros Unconditionally capture tokens for attributes. 2020-10-21 18:57:29 -04:00
rustc_codegen_cranelift u64::try_from will now fail if ScalarInt isn't exactly 64 bits, thus we use to_bits with the correct size 2020-11-04 13:59:11 +00:00
rustc_codegen_llvm Auto merge of #78280 - bugadani:span, r=lcnr 2020-11-04 17:17:01 +00:00
rustc_codegen_ssa Auto merge of #78280 - bugadani:span, r=lcnr 2020-11-04 17:17:01 +00:00
rustc_data_structures Move post order walk to iterative approach 2020-10-31 18:52:00 +01:00
rustc_driver Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
rustc_error_codes Rollup merge of #78332 - PoignardAzur:doc_E0308, r=camelid 2020-10-27 08:44:54 +09:00
rustc_errors Auto merge of #76931 - oli-obk:const_prop_inline_lint_madness, r=wesleywiser 2020-11-03 16:32:34 +00:00
rustc_expand Rollup merge of #78626 - fusion-engineering-forks:deprecated-trait-impl, r=estebank 2020-11-03 19:32:36 +01:00
rustc_feature Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
rustc_fs_util
rustc_graphviz Reuse memory 2020-10-28 17:22:10 +01:00
rustc_hir Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
rustc_hir_pretty Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
rustc_incremental Delete files immediately, instead of collecting into vector 2020-10-28 17:22:10 +01:00
rustc_index
rustc_infer Remove implicit Continue type 2020-10-30 12:27:47 +01:00
rustc_interface Rollup merge of #78610 - petrochenkov:nostriptok, r=Aaron1011 2020-11-02 14:14:34 +09:00
rustc_lexer Add back missing comments 2020-10-30 10:13:41 -04:00
rustc_lint u128 truncation and sign extension are not just interpreter related 2020-11-04 13:41:58 +00:00
rustc_lint_defs Turn 'useless #[deprecated]' error into a lint. 2020-11-01 20:48:58 +01:00
rustc_llvm Rollup merge of #77950 - arlosi:sha256, r=eddyb 2020-11-03 19:32:26 +01:00
rustc_macros Remove implicit Continue type 2020-10-30 12:27:47 +01:00
rustc_metadata Auto merge of #78448 - rylev:cache-foreign_modules, r=wesleywiser 2020-11-03 04:27:27 +00:00
rustc_middle Make ScalarInt entirely independent of MIR interpretation 2020-11-04 13:55:29 +00:00
rustc_mir u128 truncation and sign extension are not just interpreter related 2020-11-04 13:41:58 +00:00
rustc_mir_build u128 truncation and sign extension are not just interpreter related 2020-11-04 13:41:58 +00:00
rustc_parse Use reparsed TokenStream if we captured any inner attributes 2020-11-02 13:22:03 -05:00
rustc_parse_format
rustc_passes Rollup merge of #78626 - fusion-engineering-forks:deprecated-trait-impl, r=estebank 2020-11-03 19:32:36 +01:00
rustc_plugin_impl
rustc_privacy Auto merge of #78182 - LeSeulArtichaut:ty-visitor-contolflow, r=lcnr,oli-obk 2020-10-30 22:53:55 +00:00
rustc_query_system Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
rustc_resolve Expand NtExpr tokens only in key-value attributes 2020-11-03 00:53:43 +03:00
rustc_save_analysis Show the inline stack of MIR lints that only occur after inlining 2020-10-27 14:08:07 +00:00
rustc_serialize
rustc_session Rollup merge of #77950 - arlosi:sha256, r=eddyb 2020-11-03 19:32:26 +01:00
rustc_span Auto merge of #78711 - m-ou-se:rollup-pxqnny7, r=m-ou-se 2020-11-03 18:58:06 +00:00
rustc_symbol_mangling u128 truncation and sign extension are not just interpreter related 2020-11-04 13:41:58 +00:00
rustc_target Update compiler/rustc_target/src/abi/mod.rs 2020-11-04 15:13:06 +01:00
rustc_trait_selection Fix format 2020-11-02 16:59:11 +09:00
rustc_traits Auto merge of #78182 - LeSeulArtichaut:ty-visitor-contolflow, r=lcnr,oli-obk 2020-10-30 22:53:55 +00:00
rustc_ty Calculate visibilities once in resolve 2020-10-19 11:57:50 +03:00
rustc_typeck Auto merge of #78662 - sexxi-goose:add_expr_id_to_delegate, r=nikomatsakis 2020-11-04 22:45:15 +00:00