Skip to content

Commit 73988b6

Browse files
authored
Rollup merge of #93018 - pierwill:rm-unused-ord, r=davidtwco
Remove some unused `Ord` derives based on `Span` Remove some `Ord`, `PartialOrd` derivations that rely on underlying ordering of `Span`. These ordering traits appear to be unused right now. If we're going to attempt to remove ordering traits from `Span` as suggested in #90317 (comment), we might want to slowly remove code that depends on this ordering (as opposed to the all-at-once approach in #90749 and #90408). cc `@tmiasko` `@cjgillot`
2 parents 262f48e + ae9b624 commit 73988b6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: compiler/rustc_ast/src/ast.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2006,7 +2006,7 @@ bitflags::bitflags! {
20062006
}
20072007
}
20082008

2009-
#[derive(Clone, PartialEq, PartialOrd, Encodable, Decodable, Debug, Hash, HashStable_Generic)]
2009+
#[derive(Clone, PartialEq, Encodable, Decodable, Debug, Hash, HashStable_Generic)]
20102010
pub enum InlineAsmTemplatePiece {
20112011
String(String),
20122012
Placeholder { operand_idx: usize, modifier: Option<char>, span: Span },
@@ -2211,7 +2211,7 @@ pub enum IsAuto {
22112211
No,
22122212
}
22132213

2214-
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Encodable, Decodable, Debug)]
2214+
#[derive(Copy, Clone, PartialEq, Eq, Hash, Encodable, Decodable, Debug)]
22152215
#[derive(HashStable_Generic)]
22162216
pub enum Unsafe {
22172217
Yes(Span),

Diff for: compiler/rustc_middle/src/mir/terminator.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ impl<'a> Iterator for SwitchTargetsIter<'a> {
105105

106106
impl<'a> ExactSizeIterator for SwitchTargetsIter<'a> {}
107107

108-
#[derive(Clone, TyEncodable, TyDecodable, Hash, HashStable, PartialEq, PartialOrd)]
108+
#[derive(Clone, TyEncodable, TyDecodable, Hash, HashStable, PartialEq)]
109109
pub enum TerminatorKind<'tcx> {
110110
/// Block should have one successor in the graph; we jump there.
111111
Goto { target: BasicBlock },

0 commit comments

Comments
 (0)