@@ -138,10 +138,9 @@ 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 ( )
141
+ if toolchain. is_some_and ( |val| !val. is_empty ( ) )
143
142
{
144
- cargo_command. arg ( toolchain) ;
143
+ cargo_command. arg ( toolchain. unwrap ( ) ) ;
145
144
}
146
145
cargo_command. args ( [ "build" , "--target" , target, "--release" ] ) ;
147
146
@@ -251,12 +250,13 @@ pub fn generate_rust_test_loop<T: IntrinsicTypeDefinition>(
251
250
252
251
/// Generate the specializations (unique sequences of const-generic arguments) for this intrinsic.
253
252
fn generate_rust_specializations < ' a > (
254
- constraints : & mut impl Iterator < Item = std :: ops :: Range < i64 > > ,
253
+ constraints : & mut impl Iterator < Item = Vec < i64 > > ,
255
254
) -> Vec < Vec < u8 > > {
256
255
let mut specializations = vec ! [ vec![ ] ] ;
257
256
258
257
for constraint in constraints {
259
258
specializations = constraint
259
+ . into_iter ( )
260
260
. flat_map ( |right| {
261
261
specializations. iter ( ) . map ( move |left| {
262
262
let mut left = left. clone ( ) ;
@@ -288,7 +288,7 @@ pub fn create_rust_test_module<T: IntrinsicTypeDefinition>(
288
288
let specializations = generate_rust_specializations (
289
289
& mut arguments
290
290
. 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 ( ) ) ) ,
292
292
) ;
293
293
294
294
generate_rust_test_loop ( w, intrinsic, indentation, & specializations, PASSES ) ?;
0 commit comments