Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

derive(Hash) on externally facing enums and offsets. #192

Merged
merged 1 commit into from Mar 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/abbrev.rs
Expand Up @@ -9,7 +9,7 @@ use std::collections::hash_map;
use Section;

/// An offset into the `.debug_abbrev` section.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct DebugAbbrevOffset(pub usize);

/// The `DebugAbbrev` struct represents the abbreviations describing
Expand Down
4 changes: 2 additions & 2 deletions src/cfi.rs
Expand Up @@ -16,7 +16,7 @@ use std::str;
use Section;

/// An offset into the `.debug_frame` section.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct DebugFrameOffset(pub usize);

impl Into<usize> for DebugFrameOffset {
Expand All @@ -32,7 +32,7 @@ impl From<usize> for DebugFrameOffset {
}

/// An offset into the `.eh_frame` section.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct EhFrameOffset(pub usize);

impl Into<usize> for EhFrameOffset {
Expand Down
2 changes: 1 addition & 1 deletion src/constants.rs
Expand Up @@ -56,7 +56,7 @@ use std::fmt;
// }
macro_rules! dw {
($struct_name:ident($struct_type:ty) { $($name:ident = $val:expr),+ }) => {
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct $struct_name(pub $struct_type);

$(
Expand Down
2 changes: 1 addition & 1 deletion src/loc.rs
Expand Up @@ -6,7 +6,7 @@ use std::marker::PhantomData;
use Section;

/// An offset into the `.debug_loc` section.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct DebugLocOffset(pub usize);

/// The `DebugLoc` struct represents the DWARF strings
Expand Down
2 changes: 1 addition & 1 deletion src/parser.rs
Expand Up @@ -726,7 +726,7 @@ pub fn parse_encoded_pointer<'bases, 'input, Endian>
}

/// An offset into the `.debug_macinfo` section.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct DebugMacinfoOffset(pub usize);

/// Parse an unsigned LEB128 encoded integer.
Expand Down
2 changes: 1 addition & 1 deletion src/ranges.rs
Expand Up @@ -5,7 +5,7 @@ use std::marker::PhantomData;
use Section;

/// An offset into the `.debug_ranges` section.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct DebugRangesOffset(pub usize);

/// The `DebugRanges` struct represents the DWARF strings
Expand Down
8 changes: 4 additions & 4 deletions src/unit.rs
Expand Up @@ -21,19 +21,19 @@ use str::{DebugStr, DebugStrOffset};
use Section;

/// An offset into the `.debug_types` section.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct DebugTypesOffset(pub usize);

/// A type signature as used in the `.debug_types` section.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct DebugTypeSignature(pub u64);

/// An offset into the `.debug_info` section.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct DebugInfoOffset(pub usize);

/// An offset into the current compilation or type unit.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Ord, PartialOrd)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Ord, PartialOrd, Hash)]
pub struct UnitOffset(pub usize);

/// The `DebugInfo` struct represents the DWARF debugging information found in
Expand Down