@@ -138,10 +138,8 @@ pub fn compile_rust_programs(toolchain: Option<&str>, target: &str, linker: Opti
138
138
// Do not use the target directory of the workspace please.
139
139
cargo_command. env ( "CARGO_TARGET_DIR" , "target" ) ;
140
140
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 ( ) ) ;
145
143
}
146
144
cargo_command. args ( [ "build" , "--target" , target, "--release" ] ) ;
147
145
@@ -251,12 +249,13 @@ pub fn generate_rust_test_loop<T: IntrinsicTypeDefinition>(
251
249
252
250
/// Generate the specializations (unique sequences of const-generic arguments) for this intrinsic.
253
251
fn generate_rust_specializations < ' a > (
254
- constraints : & mut impl Iterator < Item = std :: ops :: Range < i64 > > ,
252
+ constraints : & mut impl Iterator < Item = Vec < i64 > > ,
255
253
) -> Vec < Vec < u8 > > {
256
254
let mut specializations = vec ! [ vec![ ] ] ;
257
255
258
256
for constraint in constraints {
259
257
specializations = constraint
258
+ . into_iter ( )
260
259
. flat_map ( |right| {
261
260
specializations. iter ( ) . map ( move |left| {
262
261
let mut left = left. clone ( ) ;
@@ -288,7 +287,7 @@ pub fn create_rust_test_module<T: IntrinsicTypeDefinition>(
288
287
let specializations = generate_rust_specializations (
289
288
& mut arguments
290
289
. 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 ( ) ) ) ,
292
291
) ;
293
292
294
293
generate_rust_test_loop ( w, intrinsic, indentation, & specializations, PASSES ) ?;
0 commit comments