rust/compiler
Dhruv Jauhar 1f53754236 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
2020-11-02 01:31:34 -05:00
..
2020-10-20 16:42:51 +02:00
2020-10-21 23:59:35 +02:00
2020-10-21 23:59:35 +02:00
2020-10-21 23:59:35 +02:00
2020-10-16 15:13:28 -03:00
2020-10-16 12:58:50 -04:00