File tree 3 files changed +5
-5
lines changed
crates/intrinsic-test/src
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ pub struct ArmArchitectureTest {
21
21
}
22
22
23
23
impl SupportedArchitectureTest for ArmArchitectureTest {
24
- fn create ( cli_options : ProcessedCli ) -> Self {
24
+ fn create ( cli_options : ProcessedCli ) -> Box < Self > {
25
25
let a32 = cli_options. target . contains ( "v7" ) ;
26
26
let mut intrinsics = get_neon_intrinsics ( & cli_options. filename , & cli_options. target )
27
27
. expect ( "Error parsing input file" ) ;
@@ -43,10 +43,10 @@ impl SupportedArchitectureTest for ArmArchitectureTest {
43
43
. collect :: < Vec < _ > > ( ) ;
44
44
intrinsics. dedup ( ) ;
45
45
46
- Self {
46
+ Box :: new ( Self {
47
47
intrinsics : intrinsics,
48
48
cli_options : cli_options,
49
- }
49
+ } )
50
50
}
51
51
52
52
fn build_c_file ( & self ) -> bool {
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ pub mod values;
16
16
/// Architectures must support this trait
17
17
/// to be successfully tested.
18
18
pub trait SupportedArchitectureTest {
19
- fn create ( cli_options : ProcessedCli ) -> Self ;
19
+ fn create ( cli_options : ProcessedCli ) -> Box < Self > where Self : Sized ;
20
20
fn build_c_file ( & self ) -> bool ;
21
21
fn build_rust_file ( & self ) -> bool ;
22
22
fn compare_outputs ( & self ) -> bool ;
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ fn main() {
14
14
let args: Cli = clap:: Parser :: parse ( ) ;
15
15
let processed_cli_options = ProcessedCli :: new ( args) ;
16
16
17
- let test_environment_result = match processed_cli_options. target . as_str ( ) {
17
+ let test_environment_result: Option < Box < dyn SupportedArchitectureTest > > = match processed_cli_options. target . as_str ( ) {
18
18
"aarch64-unknown-linux-gnu"
19
19
| "armv7-unknown-linux-gnueabihf"
20
20
| "aarch64_be-unknown-linux-gnu" => {
You can’t perform that action at this time.
0 commit comments