Skip to content

Commit e1762fd

Browse files
committed
rustc_typeck: remove dead impl for DefIndex.
1 parent e11dd47 commit e1762fd

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
@@ -9,7 +9,7 @@ use rustc::ty::fold::{TypeFoldable, TypeFolder};
99
use rustc::ty::{self, Ty, TyCtxt};
1010
use rustc_data_structures::sync::Lrc;
1111
use rustc_hir as hir;
12-
use rustc_hir::def_id::{DefId, DefIdSet, DefIndex};
12+
use rustc_hir::def_id::{DefId, DefIdSet};
1313
use rustc_hir::intravisit::{self, NestedVisitorMap, Visitor};
1414
use rustc_infer::infer::error_reporting::TypeAnnotationNeeded::E0282;
1515
use rustc_infer::infer::InferCtxt;
@@ -597,13 +597,6 @@ impl Locatable for Span {
597597
}
598598
}
599599

600-
impl Locatable for DefIndex {
601-
fn to_span(&self, tcx: TyCtxt<'_>) -> Span {
602-
let hir_id = tcx.hir().def_index_to_hir_id(*self);
603-
tcx.hir().span(hir_id)
604-
}
605-
}
606-
607600
impl Locatable for hir::HirId {
608601
fn to_span(&self, tcx: TyCtxt<'_>) -> Span {
609602
tcx.hir().span(*self)

0 commit comments

Comments
 (0)