Use fulfillment to check Drop impl compatibility
This commit is contained in:
parent
eac35583d2
commit
964fb67a5f
4 changed files with 105 additions and 231 deletions
|
@ -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>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue