Remove some more usages of guess_head_span

This commit is contained in:
Michael Goulet
2022-07-08 02:10:15 +00:00
parent 57f7618f62
commit 27b6ab9129
6 changed files with 20 additions and 22 deletions

View File

@@ -139,13 +139,8 @@ impl<'tcx> ObligationCause<'tcx> {
ObligationCause { span, body_id: hir::CRATE_HIR_ID, code: Default::default() }
}
pub fn span(&self, tcx: TyCtxt<'tcx>) -> Span {
pub fn span(&self, _tcx: TyCtxt<'tcx>) -> Span {
match *self.code() {
ObligationCauseCode::CompareImplMethodObligation { .. }
| ObligationCauseCode::MainFunctionType
| ObligationCauseCode::StartFunctionType => {
tcx.sess.source_map().guess_head_span(self.span)
}
ObligationCauseCode::MatchExpressionArm(box MatchExpressionArmCause {
arm_span,
..