diff --git a/cranelift/module/src/data_context.rs b/cranelift/module/src/data_context.rs index d872819b9e..6c9ab04dbe 100644 --- a/cranelift/module/src/data_context.rs +++ b/cranelift/module/src/data_context.rs @@ -10,7 +10,7 @@ use std::string::String; use std::vec::Vec; /// This specifies how data is to be initialized. -#[derive(PartialEq, Eq, Debug)] +#[derive(Clone, PartialEq, Eq, Debug)] pub enum Init { /// This indicates that no initialization has been specified yet. Uninitialized, @@ -38,6 +38,7 @@ impl Init { } /// A description of a data object. +#[derive(Clone)] pub struct DataDescription { /// How the data should be initialized. pub init: Init,