@@ -9,7 +9,7 @@ use crate::session::{
9
9
setup_cargo_command_inner,
10
10
} ;
11
11
use crate :: util;
12
- use crate :: util:: args:: { CargoArg , CommandWrapper as _, KaniArg , PassTo , to_rustc_arg } ;
12
+ use crate :: util:: args:: { CargoArg , CommandWrapper as _, KaniArg , PassTo , encode_as_rustc_arg } ;
13
13
use anyhow:: { Context , Result , bail} ;
14
14
use cargo_metadata:: diagnostic:: { Diagnostic , DiagnosticLevel } ;
15
15
use cargo_metadata:: {
@@ -81,11 +81,13 @@ crate-type = ["lib"]
81
81
// In theory, these could be passed just to the local crate rather than all crates,
82
82
// but the `cargo build` command we use for building `std` doesn't allow you to pass `rustc`
83
83
// arguments, so we have to pass them through the environment variable instead.
84
- rustc_args. push ( to_rustc_arg ( & self . kani_compiler_local_flags ( ) ) ) ;
84
+ rustc_args. push ( encode_as_rustc_arg ( & self . kani_compiler_local_flags ( ) ) ) ;
85
85
86
86
// Ignore global assembly, since `compiler_builtins` has some.
87
- rustc_args
88
- . push ( to_rustc_arg ( & [ KaniArg :: from ( "--ignore-global-asm" ) , self . reachability_arg ( ) ] ) ) ;
87
+ rustc_args. push ( encode_as_rustc_arg ( & [
88
+ KaniArg :: from ( "--ignore-global-asm" ) ,
89
+ self . reachability_arg ( ) ,
90
+ ] ) ) ;
89
91
90
92
let mut cargo_args: Vec < CargoArg > = vec ! [ "build" . into( ) ] ;
91
93
cargo_args. append ( & mut cargo_config_args ( ) ) ;
@@ -148,7 +150,7 @@ crate-type = ["lib"]
148
150
149
151
let lib_path = lib_folder ( ) . unwrap ( ) ;
150
152
let mut rustc_args = self . kani_rustc_flags ( LibConfig :: new ( lib_path) ) ;
151
- rustc_args. push ( to_rustc_arg ( & self . kani_compiler_dependency_flags ( ) ) ) ;
153
+ rustc_args. push ( encode_as_rustc_arg ( & self . kani_compiler_dependency_flags ( ) ) ) ;
152
154
153
155
let mut cargo_args: Vec < CargoArg > = vec ! [ "rustc" . into( ) ] ;
154
156
if let Some ( path) = & self . args . cargo . manifest_path {
@@ -217,7 +219,7 @@ crate-type = ["lib"]
217
219
. arg ( "--" ) // Add this delimiter so we start passing args to rustc and not Cargo
218
220
. env ( "RUSTC" , & self . kani_compiler )
219
221
. pass_rustc_args ( & rustc_args, PassTo :: AllCrates )
220
- . pass_rustc_arg ( to_rustc_arg ( & kani_pkg_args) , PassTo :: OnlyLocalCrate )
222
+ . pass_rustc_arg ( encode_as_rustc_arg ( & kani_pkg_args) , PassTo :: OnlyLocalCrate )
221
223
// This is only required for stable but is a no-op for nightly channels
222
224
. env ( "RUSTC_BOOTSTRAP" , "1" )
223
225
. env ( "CARGO_TERM_PROGRESS_WHEN" , "never" ) ;
0 commit comments