We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
DefIndex
1 parent 8d9d928 commit d2d0302Copy full SHA for d2d0302
src/librustc_typeck/check/writeback.rs
@@ -4,7 +4,7 @@
4
5
use crate::check::FnCtxt;
6
use rustc::hir;
7
-use rustc::hir::def_id::{DefId, DefIndex};
+use rustc::hir::def_id::DefId;
8
use rustc::hir::intravisit::{self, NestedVisitorMap, Visitor};
9
use rustc::infer::InferCtxt;
10
use rustc::ty::adjustment::{Adjust, Adjustment, PointerCast};
@@ -672,13 +672,6 @@ impl Locatable for Span {
672
}
673
674
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
-
682
impl Locatable for hir::HirId {
683
fn to_span(&self, tcx: TyCtxt<'_>) -> Span {
684
tcx.hir().span(*self)
0 commit comments