1
Fork 0

Remove span from UpvarCapture::ByValue

This span is unused and is superseded by capture_kind_expr_id in CaptureInfo
This commit is contained in:
Gary Guo 2021-10-09 22:11:13 +01:00
parent e012a191d7
commit 3698e03fb6
11 changed files with 28 additions and 45 deletions

View file

@ -56,13 +56,7 @@ pub enum UpvarCapture<'tcx> {
/// Upvar is captured by value. This is always true when the
/// closure is labeled `move`, but can also be true in other cases
/// depending on inference.
///
/// If the upvar was inferred to be captured by value (e.g. `move`
/// was not used), then the `Span` points to a usage that
/// required it. There may be more than one such usage
/// (e.g. `|| { a; a; }`), in which case we pick an
/// arbitrary one.
ByValue(Option<Span>),
ByValue,
/// Upvar is captured by reference.
ByRef(UpvarBorrow<'tcx>),