hir::ItemKind::TyAlias(ref ty, ref generics) => (&*ty, generics),
_ => return,
};
+ if let hir::TyKind::OpaqueDef(..) = ty.kind {
+ // Bounds are respected for `type X = impl Trait`
+ return;
+ }
let mut suggested_changing_assoc_types = false;
// There must not be a where clause
if !type_alias_generics.where_clause.predicates.is_empty() {
}
}
}
- } else if let hir::ExprKind::MethodCall(_, _, ref args) = expr.kind {
+ } else if let hir::ExprKind::MethodCall(_, _, ref args, _) = expr.kind {
// Find problematic calls to `MaybeUninit::assume_init`.
let def_id = cx.tables.type_dependent_def_id(expr.hir_id)?;
if cx.tcx.is_diagnostic_item(sym::assume_init, def_id) {