cranelift: Implement PartialEq in Function (#6157)

This commit is contained in:
Afonso Bordado
2023-04-05 23:33:10 +01:00
committed by GitHub
parent 4d5eaea6dc
commit a9cda5af19
3 changed files with 75 additions and 94 deletions

View File

@@ -64,7 +64,7 @@ impl<'de> Deserialize<'de> for VersionMarker {
/// Function parameters used when creating this function, and that will become applied after
/// compilation to materialize the final `CompiledCode`.
#[derive(Clone)]
#[derive(Clone, PartialEq)]
#[cfg_attr(feature = "enable-serde", derive(Serialize, Deserialize))]
pub struct FunctionParameters {
/// The first `SourceLoc` appearing in the function, serving as a base for every relative
@@ -351,7 +351,7 @@ impl FunctionStencil {
/// Functions can be cloned, but it is not a very fast operation.
/// The clone will have all the same entity numbers as the original.
#[derive(Clone)]
#[derive(Clone, PartialEq)]
#[cfg_attr(feature = "enable-serde", derive(Serialize, Deserialize))]
pub struct Function {
/// Name of this function.