diff options
| author | Matthew Jasper <mjjasper1@gmail.com> | 2021-11-11 23:15:47 +0000 |
|---|---|---|
| committer | Matthew Jasper <mjjasper1@gmail.com> | 2021-11-11 23:15:47 +0000 |
| commit | 3ea84e879a40725cc4f73fe36d44ce9e5aa1a5d9 (patch) | |
| tree | 7a8226ff8ef11885b4ea1ffbc4b2f5e9995ba3c5 | |
| parent | 936238a92b2f9d6e7afe7dda69b4afd903f96399 (diff) | |
| download | rust-3ea84e879a40725cc4f73fe36d44ce9e5aa1a5d9.tar.gz rust-3ea84e879a40725cc4f73fe36d44ce9e5aa1a5d9.zip | |
Remove unused field of `RegionVariableOrigin`
| -rw-r--r-- | compiler/rustc_infer/src/infer/error_reporting/mod.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_infer/src/infer/mod.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_typeck/src/check/method/confirm.rs | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_infer/src/infer/error_reporting/mod.rs b/compiler/rustc_infer/src/infer/error_reporting/mod.rs index 298346c373e..58c3aa362ea 100644 --- a/compiler/rustc_infer/src/infer/error_reporting/mod.rs +++ b/compiler/rustc_infer/src/infer/error_reporting/mod.rs @@ -2528,7 +2528,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> { infer::MiscVariable(_) => String::new(), infer::PatternRegion(_) => " for pattern".to_string(), infer::AddrOfRegion(_) => " for borrow expression".to_string(), - infer::Autoref(_, _) => " for autoref".to_string(), + infer::Autoref(_) => " for autoref".to_string(), infer::Coercion(_) => " for automatic coercion".to_string(), infer::LateBoundRegion(_, br, infer::FnCall) => { format!(" for lifetime parameter {}in function call", br_string(br)) diff --git a/compiler/rustc_infer/src/infer/mod.rs b/compiler/rustc_infer/src/infer/mod.rs index 32d3db39d64..b874947cc69 100644 --- a/compiler/rustc_infer/src/infer/mod.rs +++ b/compiler/rustc_infer/src/infer/mod.rs @@ -459,7 +459,7 @@ pub enum RegionVariableOrigin { AddrOfRegion(Span), /// Regions created as part of an autoref of a method receiver - Autoref(Span, ty::AssocItem), + Autoref(Span), /// Regions created as part of an automatic coercion Coercion(Span), @@ -1848,7 +1848,7 @@ impl RegionVariableOrigin { MiscVariable(a) | PatternRegion(a) | AddrOfRegion(a) - | Autoref(a, _) + | Autoref(a) | Coercion(a) | EarlyBoundRegion(a, ..) | LateBoundRegion(a, ..) diff --git a/compiler/rustc_typeck/src/check/method/confirm.rs b/compiler/rustc_typeck/src/check/method/confirm.rs index dc54f63f49c..e7e4e72f6c1 100644 --- a/compiler/rustc_typeck/src/check/method/confirm.rs +++ b/compiler/rustc_typeck/src/check/method/confirm.rs @@ -162,7 +162,7 @@ impl<'a, 'tcx> ConfirmContext<'a, 'tcx> { match &pick.autoref_or_ptr_adjustment { Some(probe::AutorefOrPtrAdjustment::Autoref { mutbl, unsize }) => { - let region = self.next_region_var(infer::Autoref(self.span, pick.item)); + let region = self.next_region_var(infer::Autoref(self.span)); target = self.tcx.mk_ref(region, ty::TypeAndMut { mutbl: *mutbl, ty: target }); let mutbl = match mutbl { hir::Mutability::Not => AutoBorrowMutability::Not, |
