Skip to content

Commit d2d0302

Browse files
committed
rustc_typeck: remove dead impl for DefIndex.
1 parent 8d9d928 commit d2d0302

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/librustc_typeck/check/writeback.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use crate::check::FnCtxt;
66
use rustc::hir;
7-
use rustc::hir::def_id::{DefId, DefIndex};
7+
use rustc::hir::def_id::DefId;
88
use rustc::hir::intravisit::{self, NestedVisitorMap, Visitor};
99
use rustc::infer::InferCtxt;
1010
use rustc::ty::adjustment::{Adjust, Adjustment, PointerCast};
@@ -672,13 +672,6 @@ impl Locatable for Span {
672672
}
673673
}
674674

675-
impl Locatable for DefIndex {
676-
fn to_span(&self, tcx: TyCtxt<'_>) -> Span {
677-
let hir_id = tcx.hir().def_index_to_hir_id(*self);
678-
tcx.hir().span(hir_id)
679-
}
680-
}
681-
682675
impl Locatable for hir::HirId {
683676
fn to_span(&self, tcx: TyCtxt<'_>) -> Span {
684677
tcx.hir().span(*self)

0 commit comments

Comments
 (0)