Skip to content

Commit d210b91

Browse files
authored
Rollup merge of #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 #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.
2 parents 5d3a963 + 8523074 commit d210b91

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/librustdoc/clean/types.rs

-13
Original file line numberDiff line numberDiff line change
@@ -1241,19 +1241,6 @@ impl Attributes {
12411241
}
12421242
}
12431243

1244-
impl PartialEq for Attributes {
1245-
fn eq(&self, rhs: &Self) -> bool {
1246-
self.doc_strings == rhs.doc_strings
1247-
&& self
1248-
.other_attrs
1249-
.iter()
1250-
.map(|attr| attr.id)
1251-
.eq(rhs.other_attrs.iter().map(|attr| attr.id))
1252-
}
1253-
}
1254-
1255-
impl Eq for Attributes {}
1256-
12571244
#[derive(Clone, PartialEq, Eq, Debug, Hash)]
12581245
pub(crate) enum GenericBound {
12591246
TraitBound(PolyTrait, hir::TraitBoundModifiers),

0 commit comments

Comments
 (0)