about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-06-22 22:47:21 +0000
committerbors <bors@rust-lang.org>2024-06-22 22:47:21 +0000
commit26c556dd637473fdf2960bf035214b34b622648e (patch)
tree13632c25f84eb2c0aba99e02d65bbfda794561a0
parent0ce07f61db8c9de51e6ecd38aa62eb3145417c0f (diff)
parent9749d990ed6e8f471eab13c6d7bb6868783f2143 (diff)
downloadrust-26c556dd637473fdf2960bf035214b34b622648e.tar.gz
rust-26c556dd637473fdf2960bf035214b34b622648e.zip
Auto merge of #12965 - KisaragiEffective:resolve-invalid-paths-on-bool-then, r=blyxyas
resolve `clippy::invalid_paths` on `bool::then`

*Please write a short comment explaining your change (or "none" for internal only changes)*

changelog: none
-rw-r--r--clippy_lints/src/utils/internal_lints/invalid_paths.rs1
-rw-r--r--clippy_utils/src/paths.rs1
2 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/utils/internal_lints/invalid_paths.rs b/clippy_lints/src/utils/internal_lints/invalid_paths.rs
index c62ae8d718d..0beb0bb8ed4 100644
--- a/clippy_lints/src/utils/internal_lints/invalid_paths.rs
+++ b/clippy_lints/src/utils/internal_lints/invalid_paths.rs
@@ -69,6 +69,7 @@ pub fn check_path(cx: &LateContext<'_>, path: &[&str]) -> bool {
         SimplifiedType::Float(FloatTy::F64),
         SimplifiedType::Slice,
         SimplifiedType::Str,
+        SimplifiedType::Bool,
     ]
     .iter()
     .flat_map(|&ty| cx.tcx.incoherent_impls(ty).into_iter())
diff --git a/clippy_utils/src/paths.rs b/clippy_utils/src/paths.rs
index 9bf068ee3cd..3f66813801d 100644
--- a/clippy_utils/src/paths.rs
+++ b/clippy_utils/src/paths.rs
@@ -110,5 +110,4 @@ pub const VEC_POP: [&str; 4] = ["alloc", "vec", "Vec", "pop"];
 pub const WAKER: [&str; 4] = ["core", "task", "wake", "Waker"];
 pub const OPTION_UNWRAP: [&str; 4] = ["core", "option", "Option", "unwrap"];
 pub const OPTION_EXPECT: [&str; 4] = ["core", "option", "Option", "expect"];
-#[expect(clippy::invalid_paths)] // not sure why it thinks this, it works so
 pub const BOOL_THEN: [&str; 4] = ["core", "bool", "<impl bool>", "then"];