diff --git a/src/driver.rs b/src/driver.rs index 524a31673c4d..d114a24744c2 100644 --- a/src/driver.rs +++ b/src/driver.rs @@ -301,7 +301,7 @@ fn report_clippy_ice(info: &panic::PanicInfo<'_>, bug_report_url: &str) { } // If backtraces are enabled, also print the query stack - let backtrace = std::env::var_os("RUST_BACKTRACE").map(|x| &x != "0").unwrap_or(false); + let backtrace = std::env::var_os("RUST_BACKTRACE").map_or(false, |x| &x != "0"); if backtrace { TyCtxt::try_print_query_stack(&handler);