Skip to content

Commit a4cb1c7

Browse files
committed
Reduce amount of types that need to be PartialEq
1 parent 5b0ab2c commit a4cb1c7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

compiler/rustc_codegen_ssa/src/traits/backend.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ use crate::back::write::TargetMachineFactoryFn;
2121
use crate::{CodegenResults, ModuleCodegen, TargetConfig};
2222

2323
pub trait BackendTypes {
24-
type Value: CodegenObject;
24+
type Value: CodegenObject + PartialEq;
2525
type Metadata: CodegenObject;
2626
type Function: CodegenObject;
2727

2828
type BasicBlock: Copy;
29-
type Type: CodegenObject;
29+
type Type: CodegenObject + PartialEq;
3030
type Funclet;
3131

3232
// FIXME(eddyb) find a common convention for all of the debuginfo-related

compiler/rustc_codegen_ssa/src/traits/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ pub use self::type_::{
5050
};
5151
pub use self::write::{ModuleBufferMethods, ThinBufferMethods, WriteBackendMethods};
5252

53-
pub trait CodegenObject = Copy + PartialEq + fmt::Debug;
53+
pub trait CodegenObject = Copy + fmt::Debug;
5454

5555
pub trait CodegenMethods<'tcx> = LayoutOf<'tcx, LayoutOfResult = TyAndLayout<'tcx>>
5656
+ FnAbiOf<'tcx, FnAbiOfResult = &'tcx FnAbi<'tcx, Ty<'tcx>>>

0 commit comments

Comments
 (0)