1
Fork 0

Auto merge of #96736 - oli-obk:tait_missing_wf_check, r=davidtwco

Check hidden types for well formedness at the definition site instead of only at the opaque type itself

work towards #90409 . We'll need to look into closure and generator bodies of closures and generators nested inside the hidden type in order to fix that. In hindsight this PR is not necessary for that, but it may be a bit easier with it and we'll get better diagnostics from it on its own.
This commit is contained in:
bors 2022-05-10 13:39:43 +00:00
commit eead58e75b
32 changed files with 311 additions and 150 deletions

View file

@ -110,6 +110,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
let remapped_type = infcx.infer_opaque_definition_from_instantiation(
opaque_type_key,
universal_concrete_type,
origin,
);
let ty = if check_opaque_type_parameter_valid(
infcx.tcx,