Skip to content

Commit 2f695dc

Browse files
committed
Remove unused Body::span_for_ty_context method.
1 parent c301ba5 commit 2f695dc

File tree

1 file changed

+0
-12
lines changed
  • compiler/rustc_middle/src/mir

1 file changed

+0
-12
lines changed

compiler/rustc_middle/src/mir/mod.rs

-12
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ use rustc_span::{DUMMY_SP, Span, Symbol};
3030
use tracing::{debug, trace};
3131

3232
pub use self::query::*;
33-
use self::visit::TyContext;
3433
use crate::mir::interpret::{AllocRange, Scalar};
3534
use crate::mir::visit::MirVisitable;
3635
use crate::ty::codec::{TyDecoder, TyEncoder};
@@ -540,17 +539,6 @@ impl<'tcx> Body<'tcx> {
540539
}
541540
}
542541

543-
pub fn span_for_ty_context(&self, ty_context: TyContext) -> Span {
544-
match ty_context {
545-
TyContext::UserTy(span) => span,
546-
TyContext::ReturnTy(source_info)
547-
| TyContext::LocalDecl { source_info, .. }
548-
| TyContext::YieldTy(source_info)
549-
| TyContext::ResumeTy(source_info) => source_info.span,
550-
TyContext::Location(loc) => self.source_info(loc).span,
551-
}
552-
}
553-
554542
/// Returns the return type; it always return first element from `local_decls` array.
555543
#[inline]
556544
pub fn return_ty(&self) -> Ty<'tcx> {

0 commit comments

Comments
 (0)