Skip to content

Commit

Permalink
Rollup merge of rust-lang#93018 - pierwill:rm-unused-ord, r=davidtwco
Browse files Browse the repository at this point in the history
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 rust-lang#90317 (comment), we might want to slowly remove code that depends on this ordering (as opposed to the all-at-once approach in rust-lang#90749 and rust-lang#90408).

cc `@tmiasko` `@cjgillot`
  • Loading branch information
matthiaskrgr authored Jan 18, 2022
2 parents 262f48e + ae9b624 commit 73988b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_ast/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2006,7 +2006,7 @@ bitflags::bitflags! {
}
}

#[derive(Clone, PartialEq, PartialOrd, Encodable, Decodable, Debug, Hash, HashStable_Generic)]
#[derive(Clone, PartialEq, Encodable, Decodable, Debug, Hash, HashStable_Generic)]
pub enum InlineAsmTemplatePiece {
String(String),
Placeholder { operand_idx: usize, modifier: Option<char>, span: Span },
Expand Down Expand Up @@ -2211,7 +2211,7 @@ pub enum IsAuto {
No,
}

#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Encodable, Decodable, Debug)]
#[derive(Copy, Clone, PartialEq, Eq, Hash, Encodable, Decodable, Debug)]
#[derive(HashStable_Generic)]
pub enum Unsafe {
Yes(Span),
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/mir/terminator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ impl<'a> Iterator for SwitchTargetsIter<'a> {

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

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

0 comments on commit 73988b6

Please sign in to comment.