Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions compiler/rustc_data_structures/src/svh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,8 @@ use rustc_macros::{Decodable_NoContext, Encodable_NoContext, StableHash};

use crate::fingerprint::Fingerprint;

#[derive(
Copy,
Clone,
PartialEq,
Eq,
Debug,
Encodable_NoContext,
Decodable_NoContext,
Hash,
StableHash
)]
#[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)]
#[derive(Encodable_NoContext, Decodable_NoContext, StableHash)]
pub struct Svh {
hash: Fingerprint,
}
Expand Down
15 changes: 2 additions & 13 deletions compiler/rustc_hir/src/attrs/data_structures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,19 +370,8 @@ pub enum PeImportNameType {
Undecorated,
}

#[derive(
Copy,
Clone,
Debug,
PartialEq,
Eq,
PartialOrd,
Ord,
Hash,
Encodable,
Decodable,
PrintAttribute
)]
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[derive(Encodable, Decodable, PrintAttribute)]
#[derive(StableHash)]
pub enum NativeLibKind {
/// Static library (e.g. `libfoo.a` on Linux or `foo.lib` on Windows/MSVC)
Expand Down
5 changes: 2 additions & 3 deletions compiler/rustc_lint_defs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,8 @@ impl From<StableLintExpectationId> for LintExpectationId {
/// Setting for how to handle a lint.
///
/// See: <https://doc.rust-lang.org/rustc/lints/levels.html>
#[derive(
Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash, Encodable, Decodable, StableHash
)]
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
#[derive(Encodable, Decodable, StableHash)]
pub enum Level {
/// The `allow` level will not issue any message.
Allow,
Expand Down
5 changes: 2 additions & 3 deletions compiler/rustc_middle/src/dep_graph/dep_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,8 @@ pub struct DepKindVTable<'tcx> {
/// some independent path or string that persists between runs without
/// the need to be mapped or unmapped. (This ensures we can serialize
/// them even in the absence of a tcx.)
#[derive(
Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Encodable, Decodable, StableHash
)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[derive(Encodable, Decodable, StableHash)]
pub struct WorkProductId {
hash: Fingerprint,
}
Expand Down
6 changes: 2 additions & 4 deletions compiler/rustc_span/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2126,10 +2126,8 @@ impl fmt::Debug for SourceFile {
///
/// When `SourceFile`s are exported in crate metadata, the `StableSourceFileId`
/// is updated to incorporate the `StableCrateId` of the exporting crate.
#[derive(
Debug, Clone, Copy, Hash, PartialEq, Eq, StableHash, Encodable, Decodable, Default, PartialOrd,
Ord
)]
#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq, PartialOrd, Default, Ord)]
#[derive(StableHash, Encodable, Decodable)]
pub struct StableSourceFileId(Hash128);

impl StableSourceFileId {
Expand Down
45 changes: 7 additions & 38 deletions compiler/rustc_target/src/asm/amdgpu.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::fmt;

use rustc_macros::{Decodable, Encodable, StableHash};
use rustc_span::Symbol;

use super::{InlineAsmArch, InlineAsmType, ModifierInfo};
Expand All @@ -9,19 +10,8 @@ use super::{InlineAsmArch, InlineAsmType, ModifierInfo};
/// Amdgpu register classes
///
/// The number is the size of the register class in bits.
#[derive(
Copy,
Clone,
rustc_macros::Encodable,
rustc_macros::Decodable,
Debug,
Eq,
PartialEq,
PartialOrd,
Hash,
rustc_macros::StableHash
)]
#[allow(non_camel_case_types)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Hash)]
#[derive(StableHash, Encodable, Decodable)]
pub enum AmdgpuInlineAsmRegClass {
Sgpr(u16),
Vgpr(u16),
Expand Down Expand Up @@ -267,18 +257,8 @@ impl AmdgpuInlineAsmRegClass {
/// Start index of a register.
///
/// Together with the register size this gives the range occupied by a register.
#[derive(
Copy,
Clone,
rustc_macros::Encodable,
rustc_macros::Decodable,
Debug,
Eq,
PartialEq,
PartialOrd,
Hash,
rustc_macros::StableHash
)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Hash)]
#[derive(Encodable, Decodable, StableHash)]
enum AmdgpuRegStart {
/// Low 16-bit of the register at this index
Low(u16),
Expand All @@ -288,19 +268,8 @@ enum AmdgpuRegStart {
Full(u16),
}

#[derive(
Copy,
Clone,
rustc_macros::Encodable,
rustc_macros::Decodable,
Debug,
Eq,
PartialEq,
PartialOrd,
Hash,
rustc_macros::StableHash
)]
#[allow(non_camel_case_types)]
#[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Hash)]
#[derive(Encodable, Decodable, StableHash)]
pub struct AmdgpuInlineAsmReg {
class: AmdgpuInlineAsmRegClass,
range: AmdgpuRegStart,
Expand Down
Loading