cargo-miri: better error message when RUSTC is not set
This commit is contained in:
parent
918f39375f
commit
cc4670f54d
1 changed files with 5 additions and 1 deletions
|
@ -80,7 +80,11 @@ fn main() {
|
|||
match first.as_str() {
|
||||
"miri" => phase_cargo_miri(args),
|
||||
"runner" => phase_runner(args, RunnerPhase::Cargo),
|
||||
arg if arg == env::var("RUSTC").unwrap() => {
|
||||
arg if arg == env::var("RUSTC").unwrap_or_else(|_| {
|
||||
show_error!(
|
||||
"`cargo-miri` called without RUSTC set; please only invoke this binary through `cargo miri`"
|
||||
)
|
||||
}) => {
|
||||
// If the first arg is equal to the RUSTC env variable (which should be set at this
|
||||
// point), then we need to behave as rustc. This is the somewhat counter-intuitive
|
||||
// behavior of having both RUSTC and RUSTC_WRAPPER set
|
||||
|
|
Loading…
Add table
Reference in a new issue