Remove an unused span
This commit is contained in:
parent
1d93b35855
commit
b745a29fa5
@ -44,11 +44,7 @@ pub fn adjust_steps_as_infer_ok(
|
||||
|InferOk { value: method, obligations: o }| {
|
||||
obligations.extend(o);
|
||||
if let ty::Ref(region, _, mutbl) = *method.sig.output().kind() {
|
||||
Some(OverloadedDeref {
|
||||
region,
|
||||
mutbl,
|
||||
span: autoderef.overloaded_span(),
|
||||
})
|
||||
Some(OverloadedDeref { region, mutbl, span: autoderef.span() })
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
@ -151,8 +151,7 @@ fn adjust_self_ty(
|
||||
) -> Ty<'tcx> {
|
||||
// Commit the autoderefs by calling `autoderef` again, but this
|
||||
// time writing the results into the various typeck results.
|
||||
let mut autoderef =
|
||||
self.autoderef(self.span, unadjusted_self_ty).with_overloaded_span(self.call_expr.span);
|
||||
let mut autoderef = self.autoderef(self.call_expr.span, unadjusted_self_ty);
|
||||
let Some((ty, n)) = autoderef.nth(pick.autoderefs) else {
|
||||
return self.tcx.ty_error_with_message(
|
||||
rustc_span::DUMMY_SP,
|
||||
|
@ -27,7 +27,6 @@ pub struct Autoderef<'a, 'tcx> {
|
||||
// Meta infos:
|
||||
infcx: &'a InferCtxt<'tcx>,
|
||||
span: Span,
|
||||
overloaded_span: Span,
|
||||
body_id: hir::HirId,
|
||||
param_env: ty::ParamEnv<'tcx>,
|
||||
|
||||
@ -103,7 +102,6 @@ pub fn new(
|
||||
Autoderef {
|
||||
infcx,
|
||||
span,
|
||||
overloaded_span: span,
|
||||
body_id,
|
||||
param_env,
|
||||
state: AutoderefSnapshot {
|
||||
@ -118,10 +116,6 @@ pub fn new(
|
||||
}
|
||||
}
|
||||
|
||||
pub fn with_overloaded_span(self, overloaded_span: Span) -> Self {
|
||||
Self { overloaded_span, ..self }
|
||||
}
|
||||
|
||||
fn overloaded_deref_ty(&mut self, ty: Ty<'tcx>) -> Option<Ty<'tcx>> {
|
||||
debug!("overloaded_deref_ty({:?})", ty);
|
||||
|
||||
@ -196,10 +190,6 @@ pub fn span(&self) -> Span {
|
||||
self.span
|
||||
}
|
||||
|
||||
pub fn overloaded_span(&self) -> Span {
|
||||
self.overloaded_span
|
||||
}
|
||||
|
||||
pub fn reached_recursion_limit(&self) -> bool {
|
||||
self.state.reached_recursion_limit
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user