diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-02-13 11:09:46 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-02-21 07:12:13 +1100 |
| commit | 2f695dc64ec7912ebc93c0322566a0ac2a6a21b4 (patch) | |
| tree | c4e5f2eb88dbd08fd8c127aa70fbbcd8249070c8 | |
| parent | c301ba57a652ffdf8f39d9ddd92cf168e594f21c (diff) | |
| download | rust-2f695dc64ec7912ebc93c0322566a0ac2a6a21b4.tar.gz rust-2f695dc64ec7912ebc93c0322566a0ac2a6a21b4.zip | |
Remove unused `Body::span_for_ty_context` method.
| -rw-r--r-- | compiler/rustc_middle/src/mir/mod.rs | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/compiler/rustc_middle/src/mir/mod.rs b/compiler/rustc_middle/src/mir/mod.rs index 214fa3f38db..2e8d3f21394 100644 --- a/compiler/rustc_middle/src/mir/mod.rs +++ b/compiler/rustc_middle/src/mir/mod.rs @@ -30,7 +30,6 @@ use rustc_span::{DUMMY_SP, Span, Symbol}; use tracing::{debug, trace}; pub use self::query::*; -use self::visit::TyContext; use crate::mir::interpret::{AllocRange, Scalar}; use crate::mir::visit::MirVisitable; use crate::ty::codec::{TyDecoder, TyEncoder}; @@ -540,17 +539,6 @@ impl<'tcx> Body<'tcx> { } } - pub fn span_for_ty_context(&self, ty_context: TyContext) -> Span { - match ty_context { - TyContext::UserTy(span) => span, - TyContext::ReturnTy(source_info) - | TyContext::LocalDecl { source_info, .. } - | TyContext::YieldTy(source_info) - | TyContext::ResumeTy(source_info) => source_info.span, - TyContext::Location(loc) => self.source_info(loc).span, - } - } - /// Returns the return type; it always return first element from `local_decls` array. #[inline] pub fn return_ty(&self) -> Ty<'tcx> { |
