Function rustc_hir_analysis::collect::item_bounds::opaque_type_bounds
source · fn opaque_type_bounds<'tcx>(
tcx: TyCtxt<'tcx>,
opaque_def_id: LocalDefId,
ast_bounds: &'tcx [GenericBound<'tcx>],
item_ty: Ty<'tcx>,
span: Span
) -> &'tcx [(Clause<'tcx>, Span)]
Expand description
Opaque types don’t inherit bounds from their parent: for return position impl trait it isn’t possible to write a suitable predicate on the containing function and for type-alias impl trait we don’t have a backwards compatibility issue.