Skip to content

Commit

Permalink
Unrolled build for rust-lang#133960
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#133960 - jdonszelmann:remove-eq-on-attributes, r=notriddle

rustdoc: remove eq for clean::Attributes

This change removes the `PartialEq` and `Eq` implementations from `Attributes`. This implementation was not used, and whether the implementation is useful at all is questionable. I care about removing it, because I'm working rust-lang#131229. While simplifying the representation of attributes, I intend to remove attr ids from attributes where possible. They're actually rarely useful. This piece of code uses them, but for no real reason, so I think simply removing the implementation makes most sense. Let me know if there are major objections to this.
  • Loading branch information
rust-timer authored Dec 7, 2024
2 parents cdb89d6 + 8523074 commit a1242db
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/librustdoc/clean/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1241,19 +1241,6 @@ impl Attributes {
}
}

impl PartialEq for Attributes {
fn eq(&self, rhs: &Self) -> bool {
self.doc_strings == rhs.doc_strings
&& self
.other_attrs
.iter()
.map(|attr| attr.id)
.eq(rhs.other_attrs.iter().map(|attr| attr.id))
}
}

impl Eq for Attributes {}

#[derive(Clone, PartialEq, Eq, Debug, Hash)]
pub(crate) enum GenericBound {
TraitBound(PolyTrait, hir::TraitBoundModifiers),
Expand Down

0 comments on commit a1242db

Please sign in to comment.