diff options
| author | Maybe Waffle <waffle.lapkin@gmail.com> | 2023-05-24 14:19:22 +0000 |
|---|---|---|
| committer | Maybe Waffle <waffle.lapkin@gmail.com> | 2023-05-24 14:20:41 +0000 |
| commit | fb0f74a8c9e8b8f488ec5894d5d314caebf4c662 (patch) | |
| tree | 4cab4cc84de840cc4cce01f3627a979fed59c54c /compiler/rustc_driver_impl/src/lib.rs | |
| parent | 70db8369226c4d2386b25d66a49c8989247934bf (diff) | |
| download | rust-fb0f74a8c9e8b8f488ec5894d5d314caebf4c662.tar.gz rust-fb0f74a8c9e8b8f488ec5894d5d314caebf4c662.zip | |
Use `Option::is_some_and` and `Result::is_ok_and` in the compiler
Diffstat (limited to 'compiler/rustc_driver_impl/src/lib.rs')
| -rw-r--r-- | compiler/rustc_driver_impl/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_driver_impl/src/lib.rs b/compiler/rustc_driver_impl/src/lib.rs index 6c204b894a6..40aa69e5a41 100644 --- a/compiler/rustc_driver_impl/src/lib.rs +++ b/compiler/rustc_driver_impl/src/lib.rs @@ -1315,7 +1315,7 @@ pub fn report_ice(info: &panic::PanicInfo<'_>, bug_report_url: &str, extra_info: } // If backtraces are enabled, also print the query stack - let backtrace = env::var_os("RUST_BACKTRACE").map_or(false, |x| &x != "0"); + let backtrace = env::var_os("RUST_BACKTRACE").is_some_and(|x| &x != "0"); let num_frames = if backtrace { None } else { Some(2) }; |
