1
Fork 0

Rollup merge of #111450 - compiler-errors:opaque-ty-key, r=oli-obk

Use `OpaqueTypeKey` in query response

Makes it a bit clearer that at least one of the types being returned from a canonical query is an opaque.
This commit is contained in:
Guillaume Gomez 2023-05-20 15:37:23 +02:00 committed by GitHub
commit de074242eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 8 deletions

View file

@ -280,7 +280,7 @@ pub struct QueryResponse<'tcx, R> {
/// should get its hidden type inferred. So we bubble the opaque type
/// and the type it was compared against upwards and let the query caller
/// handle it.
pub opaque_types: Vec<(Ty<'tcx>, Ty<'tcx>)>,
pub opaque_types: Vec<(ty::OpaqueTypeKey<'tcx>, Ty<'tcx>)>,
pub value: R,
}

View file

@ -124,7 +124,7 @@ impl<'tcx> std::ops::Deref for ExternalConstraints<'tcx> {
pub struct ExternalConstraintsData<'tcx> {
// FIXME: implement this.
pub region_constraints: QueryRegionConstraints<'tcx>,
pub opaque_types: Vec<(Ty<'tcx>, Ty<'tcx>)>,
pub opaque_types: Vec<(ty::OpaqueTypeKey<'tcx>, Ty<'tcx>)>,
}
// FIXME: Having to clone `region_constraints` for folding feels bad and