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`)
This commit is contained in:
bors 2024-02-29 14:33:37 +00:00
commit a6606d1767

View file

@ -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.