@@ -138,10 +138,8 @@ 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 ( )
143- {
144- cargo_command. arg ( toolchain) ;
141+ if toolchain. is_some_and ( |val| !val. is_empty ( ) ) {
142+ cargo_command. arg ( toolchain. unwrap ( ) ) ;
145143 }
146144 cargo_command. args ( [ "build" , "--target" , target, "--release" ] ) ;
147145
@@ -251,12 +249,13 @@ pub fn generate_rust_test_loop<T: IntrinsicTypeDefinition>(
251249
252250/// Generate the specializations (unique sequences of const-generic arguments) for this intrinsic.
253251fn generate_rust_specializations < ' a > (
254- constraints : & mut impl Iterator < Item = std :: ops :: Range < i64 > > ,
252+ constraints : & mut impl Iterator < Item = Vec < i64 > > ,
255253) -> Vec < Vec < u8 > > {
256254 let mut specializations = vec ! [ vec![ ] ] ;
257255
258256 for constraint in constraints {
259257 specializations = constraint
258+ . into_iter ( )
260259 . flat_map ( |right| {
261260 specializations. iter ( ) . map ( move |left| {
262261 let mut left = left. clone ( ) ;
@@ -288,7 +287,7 @@ pub fn create_rust_test_module<T: IntrinsicTypeDefinition>(
288287 let specializations = generate_rust_specializations (
289288 & mut arguments
290289 . iter ( )
291- . filter_map ( |i| i. constraint . as_ref ( ) . map ( |v| v. to_range ( ) ) ) ,
290+ . filter_map ( |i| i. constraint . as_ref ( ) . map ( |v| v. to_vector ( ) ) ) ,
292291 ) ;
293292
294293 generate_rust_test_loop ( w, intrinsic, indentation, & specializations, PASSES ) ?;
0 commit comments