1
Fork 0

Use fulfillment to check Drop impl compatibility

This commit is contained in:
Michael Goulet 2023-04-20 03:56:36 +00:00
parent eac35583d2
commit 964fb67a5f
4 changed files with 105 additions and 231 deletions

View file

@ -102,6 +102,17 @@ pub enum RegionResolutionError<'tcx> {
),
}
impl<'tcx> RegionResolutionError<'tcx> {
pub fn origin(&self) -> &SubregionOrigin<'tcx> {
match self {
RegionResolutionError::ConcreteFailure(origin, _, _)
| RegionResolutionError::GenericBoundFailure(origin, _, _)
| RegionResolutionError::SubSupConflict(_, _, origin, _, _, _, _)
| RegionResolutionError::UpperBoundUniverseConflict(_, _, _, origin, _) => origin,
}
}
}
struct RegionAndOrigin<'tcx> {
region: Region<'tcx>,
origin: SubregionOrigin<'tcx>,