Function rustc_hir_analysis::check::check::check_opaque_precise_captures
source · fn check_opaque_precise_captures<'tcx>(
tcx: TyCtxt<'tcx>,
opaque_def_id: LocalDefId
)
Expand description
Check that the opaque’s precise captures list is valid (if present).
We check this for regular impl Trait
s and also RPITITs, even though the latter
are technically GATs.
This function is responsible for:
- Checking that all type/const params are mention in the captures list.
- Checking that all lifetimes that are implicitly captured are mentioned.
- Asserting that all parameters mentioned in the captures list are invariant.