about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-12-01 13:21:51 +0000
committerbors <bors@rust-lang.org>2022-12-01 13:21:51 +0000
commitd822110d3b5625b9dc80ccc442e06fc3cc851d76 (patch)
treeb6516bc9c6c1d00562fcc334fd0ef7ab1cfd4538 /src
parent641ced4eb96d07fba2284fa258ccb987f7afc8a1 (diff)
parent4063712bf45fcb600d23dcaea4540d95311aaa29 (diff)
downloadrust-d822110d3b5625b9dc80ccc442e06fc3cc851d76.tar.gz
rust-d822110d3b5625b9dc80ccc442e06fc3cc851d76.zip
Auto merge of #10010 - flip1995:rustup, r=flip1995
Rustup

r? `@ghost`

changelog: none
Diffstat (limited to 'src')
-rw-r--r--src/driver.rs16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/driver.rs b/src/driver.rs
index ee2a3ad20d3..9ec4df8e651 100644
--- a/src/driver.rs
+++ b/src/driver.rs
@@ -1,6 +1,7 @@
 #![feature(rustc_private)]
 #![feature(let_chains)]
 #![feature(once_cell)]
+#![feature(lint_reasons)]
 #![cfg_attr(feature = "deny-warnings", deny(warnings))]
 // warn on lints, that are included in `rust-lang/rust`s bootstrap
 #![warn(rust_2018_idioms, unused_lifetimes)]
@@ -90,11 +91,16 @@ fn track_files(parse_sess: &mut ParseSess, conf_path_string: Option<String>) {
 
     // During development track the `clippy-driver` executable so that cargo will re-run clippy whenever
     // it is rebuilt
-    if cfg!(debug_assertions)
-        && let Ok(current_exe) = env::current_exe()
-        && let Some(current_exe) = current_exe.to_str()
-    {
-        file_depinfo.insert(Symbol::intern(current_exe));
+    #[expect(
+        clippy::collapsible_if,
+        reason = "Due to a bug in let_chains this if statement can't be collapsed"
+    )]
+    if cfg!(debug_assertions) {
+        if let Ok(current_exe) = env::current_exe()
+            && let Some(current_exe) = current_exe.to_str()
+        {
+            file_depinfo.insert(Symbol::intern(current_exe));
+        }
     }
 }