Unnamed repository; edit this file 'description' to name the repository.
Auto merge of #16698 - regexident:param-derives, r=Veykril
Derive `PartialEq`, `Eq` & `Hash` for `hir::Param` Since `hir::SelfParam`, as well as all members of `hir::Param` already implement `PartialEq`, `Eq` & `Hash` it seems reasonable to also make `hir::Param` implement those. (the change is motivated by an outside use of the `ra_ap_hir` crate that would benefit from being able to collect params in a `HashSet`)
bors 2024-02-29
parent ef2acb6 · parent c061a9e · commit a6606d1
-rw-r--r--crates/hir/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs
index 6f621eb122..944eca6354 100644
--- a/crates/hir/src/lib.rs
+++ b/crates/hir/src/lib.rs
@@ -2088,7 +2088,7 @@ impl From<hir_ty::Mutability> for Access {
}
}
-#[derive(Clone, Debug)]
+#[derive(Clone, PartialEq, Eq, Hash, Debug)]
pub struct Param {
func: Function,
/// The index in parameter list, including self parameter.