Remove unused Body::span_for_ty_context
method.
This commit is contained in:
parent
c301ba57a6
commit
2f695dc64e
1 changed files with 0 additions and 12 deletions
|
@ -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> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue