pub fn opaque_type_has_defining_use_args<'tcx>(
infcx: &InferCtxt<'tcx>,
opaque_type_key: OpaqueTypeKey<'tcx>,
span: Span,
defining_scope_kind: DefiningScopeKind,
) -> Result<(), NonDefiningUseReason<'tcx>>
Expand description
Opaque type parameter validity check as documented in the rustc-dev-guide chapter. With the new solver, uses which fail this check are simply treated as non-defining and we only emit an error if no defining use exists.