Skip to content

Commit

Permalink
Remove hir::Label.
Browse files Browse the repository at this point in the history
It's identical to `ast::Label`.
  • Loading branch information
nnethercote committed Jan 16, 2019
1 parent ae4b14e commit dc45528
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
13 changes: 1 addition & 12 deletions src/librustc/hir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -142,17 +142,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,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/ich/impls_hir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
});

Expand Down

0 comments on commit dc45528

Please sign in to comment.