Skip to content
Permalink
Browse files

Use derive macro for HashStable

  • Loading branch information...
Zoxc committed Dec 3, 2018
1 parent 48757a7 commit 3936aff2169a1f61633de2bc475face3a2682efb
@@ -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,
@@ -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,
@@ -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),
@@ -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,
Oops, something went wrong.

0 comments on commit 3936aff

Please sign in to comment.
You can’t perform that action at this time.