about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-12-06 21:21:08 +0100
committerGitHub <noreply@github.com>2024-12-06 21:21:08 +0100
commitd210b91331766bf3a9ebbdb7ea1889440afc6b93 (patch)
treed6b9e73a622fbfb55f00833fa09d22f0e7c0fbe6 /src
parent5d3a96346d820e5746ba0d7e0ba123349c4e79b5 (diff)
parent85230741c7232819a01c71d158a7b763c39aeaaa (diff)
downloadrust-d210b91331766bf3a9ebbdb7ea1889440afc6b93.tar.gz
rust-d210b91331766bf3a9ebbdb7ea1889440afc6b93.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/librustdoc/clean/types.rs13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs
index 715bf68374a..cba947eb833 100644
--- a/src/librustdoc/clean/types.rs
+++ b/src/librustdoc/clean/types.rs
@@ -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),