1
Fork 0

Rollup merge of #75304 - Aaron1011:feature/diag-deref-move-out, r=estebank

Note when a a move/borrow error is caused by a deref coercion

Fixes #73268

When a deref coercion occurs, we may end up with a move error if the
base value has been partially moved out of. However, we do not indicate
anywhere that a deref coercion is occuring, resulting in an error
message with a confusing span.

This PR adds an explicit note to move errors when a deref coercion is
involved. We mention the name of the type that the deref-coercion
resolved to, as well as the `Deref::Target` associated type being used.
This commit is contained in:
Dylan DPC 2020-09-16 01:30:32 +02:00 committed by GitHub
commit fa4cfeb597
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 250 additions and 54 deletions

View file

@ -416,7 +416,9 @@ symbols! {
deny,
deprecated,
deref,
deref_method,
deref_mut,
deref_target,
derive,
diagnostic,
direct,