mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Remove unused Body::span_for_ty_context
method.
This commit is contained in:
parent
c301ba57a6
commit
2f695dc64e
@ -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…
Reference in New Issue
Block a user