Fix shifted_{in,out} calls

This commit is contained in:
Florian Diebold 2021-04-07 21:26:24 +02:00
parent dc0b581736
commit b25b147e86
5 changed files with 11 additions and 11 deletions

View file

@ -2,7 +2,7 @@
//! query, but can't be computed directly from `*Data` (ie, which need a `db`).
use std::sync::Arc;
use chalk_ir::{BoundVar, DebruijnIndex};
use chalk_ir::{fold::Shift, BoundVar, DebruijnIndex};
use hir_def::{
db::DefDatabase,
generics::{
@ -69,7 +69,7 @@ fn direct_super_trait_refs(db: &dyn HirDatabase, trait_ref: &TraitRef) -> Vec<Tr
// FIXME: how to correctly handle higher-ranked bounds here?
WhereClause::Implemented(tr) => Some(
tr.clone()
.shifted_out_to(DebruijnIndex::ONE)
.shifted_out_to(&Interner, DebruijnIndex::ONE)
.expect("FIXME unexpected higher-ranked trait bound"),
),
_ => None,