Skip to content

Commit 6631215

Browse files
committed
Remove unneeded logic
1 parent 30e933c commit 6631215

File tree

1 file changed

+4
-18
lines changed
  • compiler/rustc_typeck/src/check/fn_ctxt

1 file changed

+4
-18
lines changed

compiler/rustc_typeck/src/check/fn_ctxt/mod.rs

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ impl<'a, 'tcx> AstConv<'tcx> for FnCtxt<'a, 'tcx> {
188188
&self,
189189
_: Span,
190190
def_id: DefId,
191-
assoc_name: Ident,
191+
_: Ident,
192192
) -> ty::GenericPredicates<'tcx> {
193193
let tcx = self.tcx;
194194
let hir_id = tcx.hir().local_def_id_to_hir_id(def_id.expect_local());
@@ -202,23 +202,9 @@ impl<'a, 'tcx> AstConv<'tcx> for FnCtxt<'a, 'tcx> {
202202
self.param_env.caller_bounds().iter().filter_map(|predicate| {
203203
match predicate.skip_binders() {
204204
ty::PredicateAtom::Trait(data, _) if data.self_ty().is_param(index) => {
205-
let trait_did = data.def_id();
206-
if tcx
207-
.associated_items(trait_did)
208-
.find_by_name_and_kind(
209-
tcx,
210-
assoc_name,
211-
ty::AssocKind::Type,
212-
trait_did,
213-
)
214-
.is_some()
215-
{
216-
// HACK(eddyb) should get the original `Span`.
217-
let span = tcx.def_span(def_id);
218-
Some((predicate, span))
219-
} else {
220-
None
221-
}
205+
// HACK(eddyb) should get the original `Span`.
206+
let span = tcx.def_span(def_id);
207+
Some((predicate, span))
222208
}
223209
_ => None,
224210
}

0 commit comments

Comments
 (0)