about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2025-01-21 23:30:18 +0100
committerGitHub <noreply@github.com>2025-01-21 23:30:18 +0100
commitde12d28ce896a402a0abdc58c0222cace76b7873 (patch)
tree5621935f4c1fdb06093d1fe0169d6b6677fb28df
parentd22dcb9cb41bc23b0190f2a7eefa9af95bb34d33 (diff)
parent699296d3863d675f688cf35e9b9c67b94d034c60 (diff)
downloadrust-de12d28ce896a402a0abdc58c0222cace76b7873.tar.gz
rust-de12d28ce896a402a0abdc58c0222cace76b7873.zip
Rollup merge of #135706 - compiler-errors:elaborate, r=lcnr
Move `supertrait_def_ids` into the elaborate module like all other fns

It's strange that this is the only elaborate-like fn on tcx.

r? lcnr
-rw-r--r--clippy_lints/src/len_zero.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/clippy_lints/src/len_zero.rs b/clippy_lints/src/len_zero.rs
index 5418acc105e..26bea8d633a 100644
--- a/clippy_lints/src/len_zero.rs
+++ b/clippy_lints/src/len_zero.rs
@@ -18,6 +18,7 @@ use rustc_session::declare_lint_pass;
 use rustc_span::source_map::Spanned;
 use rustc_span::symbol::sym;
 use rustc_span::{Span, Symbol};
+use rustc_trait_selection::traits::supertrait_def_ids;
 
 declare_clippy_lint! {
     /// ### What it does
@@ -270,7 +271,7 @@ fn check_trait_items(cx: &LateContext<'_>, visited_trait: &Item<'_>, trait_items
     // fill the set with current and super traits
     fn fill_trait_set(traitt: DefId, set: &mut DefIdSet, cx: &LateContext<'_>) {
         if set.insert(traitt) {
-            for supertrait in cx.tcx.supertrait_def_ids(traitt) {
+            for supertrait in supertrait_def_ids(cx.tcx, traitt) {
                 fill_trait_set(supertrait, set, cx);
             }
         }