Skip to content

Commit

Permalink
Remove unused field of RegionVariableOrigin
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewjasper committed Nov 11, 2021
1 parent 936238a commit 3ea84e8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_infer/src/infer/error_reporting/mod.rs
Expand Up @@ -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))
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_infer/src/infer/mod.rs
Expand Up @@ -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),
Expand Down Expand Up @@ -1848,7 +1848,7 @@ impl RegionVariableOrigin {
MiscVariable(a)
| PatternRegion(a)
| AddrOfRegion(a)
| Autoref(a, _)
| Autoref(a)
| Coercion(a)
| EarlyBoundRegion(a, ..)
| LateBoundRegion(a, ..)
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_typeck/src/check/method/confirm.rs
Expand Up @@ -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,
Expand Down

0 comments on commit 3ea84e8

Please sign in to comment.