From b710e08868514fb08ab3e93c85c1019aec1c7cf3 Mon Sep 17 00:00:00 2001 From: ljedrz Date: Wed, 19 Jun 2019 15:28:27 +0200 Subject: [PATCH] remove TyCtx::expr_span (unused) --- src/librustc/ty/mod.rs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/librustc/ty/mod.rs b/src/librustc/ty/mod.rs index 361410380e8..e8b75be27e5 100644 --- a/src/librustc/ty/mod.rs +++ b/src/librustc/ty/mod.rs @@ -2777,20 +2777,6 @@ impl<'tcx> TyCtxt<'tcx> { }); } - pub fn expr_span(self, id: NodeId) -> Span { - match self.hir().find(id) { - Some(Node::Expr(e)) => { - e.span - } - Some(f) => { - bug!("node-ID {} is not an expr: {:?}", id, f); - } - None => { - bug!("node-ID {} is not present in the node map", id); - } - } - } - pub fn provided_trait_methods(self, id: DefId) -> Vec { self.associated_items(id) .filter(|item| item.kind == AssocKind::Method && item.defaultness.has_value())