Skip to content

Commit 3ea84e8

Browse files
committed
Remove unused field of RegionVariableOrigin
1 parent 936238a commit 3ea84e8

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

compiler/rustc_infer/src/infer/error_reporting/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2528,7 +2528,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
25282528
infer::MiscVariable(_) => String::new(),
25292529
infer::PatternRegion(_) => " for pattern".to_string(),
25302530
infer::AddrOfRegion(_) => " for borrow expression".to_string(),
2531-
infer::Autoref(_, _) => " for autoref".to_string(),
2531+
infer::Autoref(_) => " for autoref".to_string(),
25322532
infer::Coercion(_) => " for automatic coercion".to_string(),
25332533
infer::LateBoundRegion(_, br, infer::FnCall) => {
25342534
format!(" for lifetime parameter {}in function call", br_string(br))

compiler/rustc_infer/src/infer/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ pub enum RegionVariableOrigin {
459459
AddrOfRegion(Span),
460460

461461
/// Regions created as part of an autoref of a method receiver
462-
Autoref(Span, ty::AssocItem),
462+
Autoref(Span),
463463

464464
/// Regions created as part of an automatic coercion
465465
Coercion(Span),
@@ -1848,7 +1848,7 @@ impl RegionVariableOrigin {
18481848
MiscVariable(a)
18491849
| PatternRegion(a)
18501850
| AddrOfRegion(a)
1851-
| Autoref(a, _)
1851+
| Autoref(a)
18521852
| Coercion(a)
18531853
| EarlyBoundRegion(a, ..)
18541854
| LateBoundRegion(a, ..)

compiler/rustc_typeck/src/check/method/confirm.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ impl<'a, 'tcx> ConfirmContext<'a, 'tcx> {
162162

163163
match &pick.autoref_or_ptr_adjustment {
164164
Some(probe::AutorefOrPtrAdjustment::Autoref { mutbl, unsize }) => {
165-
let region = self.next_region_var(infer::Autoref(self.span, pick.item));
165+
let region = self.next_region_var(infer::Autoref(self.span));
166166
target = self.tcx.mk_ref(region, ty::TypeAndMut { mutbl: *mutbl, ty: target });
167167
let mutbl = match mutbl {
168168
hir::Mutability::Not => AutoBorrowMutability::Not,

0 commit comments

Comments
 (0)