@@ -138,10 +138,9 @@ pub fn compile_rust_programs(toolchain: Option<&str>, target: &str, linker: Opti
138138 // Do not use the target directory of the workspace please.
139139 cargo_command. env ( "CARGO_TARGET_DIR" , "target" ) ;
140140
141- if let Some ( toolchain) = toolchain
142- && !toolchain. is_empty ( )
141+ if toolchain. is_some_and ( |val| !val. is_empty ( ) )
143142 {
144- cargo_command. arg ( toolchain) ;
143+ cargo_command. arg ( toolchain. unwrap ( ) ) ;
145144 }
146145 cargo_command. args ( [ "build" , "--target" , target, "--release" ] ) ;
147146
@@ -251,12 +250,13 @@ pub fn generate_rust_test_loop<T: IntrinsicTypeDefinition>(
251250
252251/// Generate the specializations (unique sequences of const-generic arguments) for this intrinsic.
253252fn generate_rust_specializations < ' a > (
254- constraints : & mut impl Iterator < Item = std :: ops :: Range < i64 > > ,
253+ constraints : & mut impl Iterator < Item = Vec < i64 > > ,
255254) -> Vec < Vec < u8 > > {
256255 let mut specializations = vec ! [ vec![ ] ] ;
257256
258257 for constraint in constraints {
259258 specializations = constraint
259+ . into_iter ( )
260260 . flat_map ( |right| {
261261 specializations. iter ( ) . map ( move |left| {
262262 let mut left = left. clone ( ) ;
@@ -288,7 +288,7 @@ pub fn create_rust_test_module<T: IntrinsicTypeDefinition>(
288288 let specializations = generate_rust_specializations (
289289 & mut arguments
290290 . iter ( )
291- . filter_map ( |i| i. constraint . as_ref ( ) . map ( |v| v. to_range ( ) ) ) ,
291+ . filter_map ( |i| i. constraint . as_ref ( ) . map ( |v| v. to_vector ( ) ) ) ,
292292 ) ;
293293
294294 generate_rust_test_loop ( w, intrinsic, indentation, & specializations, PASSES ) ?;
0 commit comments