Skip to content

Commit de12d28

Browse files
authored
Rollup merge of rust-lang#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
2 parents d22dcb9 + 699296d commit de12d28

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clippy_lints/src/len_zero.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ use rustc_session::declare_lint_pass;
1818
use rustc_span::source_map::Spanned;
1919
use rustc_span::symbol::sym;
2020
use rustc_span::{Span, Symbol};
21+
use rustc_trait_selection::traits::supertrait_def_ids;
2122

2223
declare_clippy_lint! {
2324
/// ### What it does
@@ -270,7 +271,7 @@ fn check_trait_items(cx: &LateContext<'_>, visited_trait: &Item<'_>, trait_items
270271
// fill the set with current and super traits
271272
fn fill_trait_set(traitt: DefId, set: &mut DefIdSet, cx: &LateContext<'_>) {
272273
if set.insert(traitt) {
273-
for supertrait in cx.tcx.supertrait_def_ids(traitt) {
274+
for supertrait in supertrait_def_ids(cx.tcx, traitt) {
274275
fill_trait_set(supertrait, set, cx);
275276
}
276277
}

0 commit comments

Comments
 (0)