use rustc_span::Span;
-use rustc_error_codes::*;
-
/// Checks that all the type/lifetime parameters on an impl also
/// appear in the trait ref or self type (or are constrained by a
/// where-clause). These rules are needed to ensure that, given a
impl ItemLikeVisitor<'tcx> for ImplWfCheck<'tcx> {
fn visit_item(&mut self, item: &'tcx hir::Item<'tcx>) {
- if let hir::ItemKind::Impl(.., ref impl_item_refs) = item.kind {
+ if let hir::ItemKind::Impl { ref items, .. } = item.kind {
let impl_def_id = self.tcx.hir().local_def_id(item.hir_id);
- enforce_impl_params_are_constrained(self.tcx, impl_def_id, impl_item_refs);
- enforce_impl_items_are_distinct(self.tcx, impl_item_refs);
+ enforce_impl_params_are_constrained(self.tcx, impl_def_id, items);
+ enforce_impl_items_are_distinct(self.tcx, items);
}
}