Skip to content

Commit

Permalink
Auto merge of #56864 - Zoxc:stable-hash-macro, r=michaelwoerister
Browse files Browse the repository at this point in the history
Use derive macro for HashStable

Blocked on #56795
  • Loading branch information
bors committed Mar 13, 2019
2 parents aa97448 + bc3a84a commit cf6d881
Show file tree
Hide file tree
Showing 37 changed files with 366 additions and 2,624 deletions.
9 changes: 5 additions & 4 deletions src/librustc/hir/def.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ use crate::util::nodemap::{NodeMap, DefIdMap};
use syntax::ast;
use syntax::ext::base::MacroKind;
use syntax_pos::Span;
use rustc_macros::HashStable;
use crate::hir;
use crate::ty;

use self::Namespace::*;

#[derive(Clone, Copy, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
#[derive(Clone, Copy, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, HashStable)]
pub enum CtorKind {
/// Constructor function automatically created by a tuple struct/variant.
Fn,
Expand All @@ -18,7 +19,7 @@ pub enum CtorKind {
Fictive,
}

#[derive(Clone, Copy, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
#[derive(Clone, Copy, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, HashStable)]
pub enum NonMacroAttrKind {
/// Single-segment attribute defined by the language (`#[inline]`)
Builtin,
Expand All @@ -32,7 +33,7 @@ pub enum NonMacroAttrKind {
Custom,
}

#[derive(Clone, Copy, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
#[derive(Clone, Copy, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, HashStable)]
pub enum Def {
// Type namespace
Mod(DefId),
Expand Down Expand Up @@ -209,7 +210,7 @@ pub type ExportMap = DefIdMap<Vec<Export>>;
/// namespace.
pub type ImportMap = NodeMap<PerNS<Option<PathResolution>>>;

#[derive(Copy, Clone, Debug, RustcEncodable, RustcDecodable)]
#[derive(Copy, Clone, Debug, RustcEncodable, RustcDecodable, HashStable)]
pub struct Export {
/// The name of the target.
pub ident: ast::Ident,
Expand Down
Loading

0 comments on commit cf6d881

Please sign in to comment.