File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
crates/intrinsic-test/src Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ pub struct ArmArchitectureTest {
2121}
2222
2323impl SupportedArchitectureTest for ArmArchitectureTest {
24- fn create ( cli_options : ProcessedCli ) -> Self {
24+ fn create ( cli_options : ProcessedCli ) -> Box < Self > {
2525 let a32 = cli_options. target . contains ( "v7" ) ;
2626 let mut intrinsics = get_neon_intrinsics ( & cli_options. filename , & cli_options. target )
2727 . expect ( "Error parsing input file" ) ;
@@ -43,10 +43,10 @@ impl SupportedArchitectureTest for ArmArchitectureTest {
4343 . collect :: < Vec < _ > > ( ) ;
4444 intrinsics. dedup ( ) ;
4545
46- Self {
46+ Box :: new ( Self {
4747 intrinsics : intrinsics,
4848 cli_options : cli_options,
49- }
49+ } )
5050 }
5151
5252 fn build_c_file ( & self ) -> bool {
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ pub mod values;
1616/// Architectures must support this trait
1717/// to be successfully tested.
1818pub trait SupportedArchitectureTest {
19- fn create ( cli_options : ProcessedCli ) -> Self ;
19+ fn create ( cli_options : ProcessedCli ) -> Box < Self > where Self : Sized ;
2020 fn build_c_file ( & self ) -> bool ;
2121 fn build_rust_file ( & self ) -> bool ;
2222 fn compare_outputs ( & self ) -> bool ;
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ fn main() {
1414 let args: Cli = clap:: Parser :: parse ( ) ;
1515 let processed_cli_options = ProcessedCli :: new ( args) ;
1616
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 ( ) {
1818 "aarch64-unknown-linux-gnu"
1919 | "armv7-unknown-linux-gnueabihf"
2020 | "aarch64_be-unknown-linux-gnu" => {
You can’t perform that action at this time.
0 commit comments