1
Fork 0

Remove unnecessary RegionKind:: quals.

The variant names are exported, so we can use them directly (possibly
with a `ty::` qualifier). Lots of places already do this, this commit
just increases consistency.
This commit is contained in:
Nicholas Nethercote 2022-02-01 12:57:04 +11:00
parent 7024dc523a
commit 7eb15509ce
10 changed files with 56 additions and 71 deletions

View file

@ -428,7 +428,7 @@ impl<'cx, 'tcx> InferCtxt<'cx, 'tcx> {
}
GenericArgKind::Lifetime(result_value) => {
// e.g., here `result_value` might be `'?1` in the example above...
if let ty::RegionKind::ReLateBound(debruijn, br) = *result_value {
if let ty::ReLateBound(debruijn, br) = *result_value {
// ... in which case we would set `canonical_vars[0]` to `Some('static)`.
// We only allow a `ty::INNERMOST` index in substitutions.