about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-08-27 17:48:23 +0000
committerbors <bors@rust-lang.org>2020-08-27 17:48:23 +0000
commit132f5fc2e5247cf5dab74e5a4408135056852c30 (patch)
tree199069ce54a9da2e7124452128dbeab9a1cc5306 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
parent3d0c847d3353e319ed82598a106e28fd490caa6b (diff)
parentb5b8b9329b3a118879bad6c476612d49f89461a3 (diff)
downloadrust-132f5fc2e5247cf5dab74e5a4408135056852c30.tar.gz
rust-132f5fc2e5247cf5dab74e5a4408135056852c30.zip
Auto merge of #75933 - Aaron1011:feature/closure-move-err, r=oli-obk
Point to a move-related span when pointing to closure upvars

Fixes #75904

When emitting move/borrow errors, we may point into a closure to
indicate why an upvar is used in the closure. However, we use the
'upvar span', which is just an arbitrary usage of the upvar. If the
upvar is used in multiple places (e.g. a borrow and a move), we may end
up pointing to the borrow. If the overall error is a move error, this
can be confusing.

This PR tracks the span that caused an upvar to become captured by-value
instead of by-ref (assuming that it's not a `move` closure). We use this
span instead of the 'upvar' span when we need to point to an upvar usage
during borrow checking.
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs')
0 files changed, 0 insertions, 0 deletions