about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2019-01-16 16:20:32 +1100
committerNicholas Nethercote <nnethercote@mozilla.com>2019-01-16 16:20:32 +1100
commitdc455286205bc0b3be6a6c6dcefff0498a6f4bcf (patch)
tree2b0617cb8989454e9ff7141200ed04531a12f40c
parentae4b14e837b613febc9a7ccfee4230fb22044a10 (diff)
downloadrust-dc455286205bc0b3be6a6c6dcefff0498a6f4bcf.tar.gz
rust-dc455286205bc0b3be6a6c6dcefff0498a6f4bcf.zip
Remove `hir::Label`.
It's identical to `ast::Label`.
-rw-r--r--src/librustc/hir/mod.rs13
-rw-r--r--src/librustc/ich/impls_hir.rs2
2 files changed, 2 insertions, 13 deletions
diff --git a/src/librustc/hir/mod.rs b/src/librustc/hir/mod.rs
index cf4bd27a090..aaef1c722be 100644
--- a/src/librustc/hir/mod.rs
+++ b/src/librustc/hir/mod.rs
@@ -19,7 +19,7 @@ use syntax_pos::{Span, DUMMY_SP, symbol::InternedString};
 use syntax::source_map::{self, Spanned};
 use rustc_target::spec::abi::Abi;
 use syntax::ast::{self, CrateSugar, Ident, Name, NodeId, DUMMY_NODE_ID, AsmDialect};
-use syntax::ast::{Attribute, Lit, StrStyle, FloatTy, IntTy, UintTy};
+use syntax::ast::{Attribute, Label, Lit, StrStyle, FloatTy, IntTy, UintTy};
 use syntax::attr::InlineAttr;
 use syntax::ext::hygiene::SyntaxContext;
 use syntax::ptr::P;
@@ -143,17 +143,6 @@ pub const DUMMY_HIR_ID: HirId = HirId {
 pub const DUMMY_ITEM_LOCAL_ID: ItemLocalId = ItemLocalId::MAX;
 
 #[derive(Clone, RustcEncodable, RustcDecodable, Copy)]
-pub struct Label {
-    pub ident: Ident,
-}
-
-impl fmt::Debug for Label {
-    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        write!(f, "label({:?})", self.ident)
-    }
-}
-
-#[derive(Clone, RustcEncodable, RustcDecodable, Copy)]
 pub struct Lifetime {
     pub id: NodeId,
     pub span: Span,
diff --git a/src/librustc/ich/impls_hir.rs b/src/librustc/ich/impls_hir.rs
index 8ff60e5f562..f48059b328f 100644
--- a/src/librustc/ich/impls_hir.rs
+++ b/src/librustc/ich/impls_hir.rs
@@ -153,7 +153,7 @@ impl_stable_hash_for!(enum hir::LifetimeName {
     Error,
 });
 
-impl_stable_hash_for!(struct hir::Label {
+impl_stable_hash_for!(struct ast::Label {
     ident
 });