Skip to content

Commit

Permalink
Rollup merge of rust-lang#135706 - compiler-errors:elaborate, r=lcnr
Browse files Browse the repository at this point in the history
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
  • Loading branch information
matthiaskrgr authored Jan 21, 2025
2 parents d22dcb9 + 699296d commit de12d28
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clippy_lints/src/len_zero.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
}
}
Expand Down

0 comments on commit de12d28

Please sign in to comment.