Skip to content

Commit

Permalink
Create obligation from depth=0
Browse files Browse the repository at this point in the history
  • Loading branch information
nilehmann committed May 21, 2024
1 parent ed9bcc2 commit 78ee077
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions crates/flux-middle/src/rty/projections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,9 @@ impl<'genv, 'tcx, 'cx> Normalizer<'genv, 'tcx, 'cx> {
}

fn impl_id_of_alias_reft(&mut self, alias: &AliasReft) -> QueryResult<Option<DefId>> {
let trait_pred = Obligation::with_depth(
let trait_pred = Obligation::new(
self.tcx(),
ObligationCause::dummy(),
5,
self.rustc_param_env(),
alias.to_rustc_trait_ref(self.tcx()),
);
Expand All @@ -189,10 +188,9 @@ impl<'genv, 'tcx, 'cx> Normalizer<'genv, 'tcx, 'cx> {
obligation: &AliasTy,
candidates: &mut Vec<Candidate>,
) -> QueryResult {
let trait_pred = Obligation::with_depth(
let trait_pred = Obligation::new(
self.tcx(),
ObligationCause::dummy(),
5,
self.rustc_param_env(),
obligation.to_rustc(self.tcx()).trait_ref(self.tcx()),
);
Expand Down

0 comments on commit 78ee077

Please sign in to comment.