Skip to content

Commit

Permalink
Auto merge of rust-lang#123737 - compiler-errors:alias-wf, r=<try>
Browse files Browse the repository at this point in the history
Check alias args for WF even if they have escaping bound vars

r? `@ghost`
  • Loading branch information
bors committed Apr 15, 2024
2 parents 84e729a + c9b6f83 commit 8d9ad77
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compiler/rustc_trait_selection/src/traits/wf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ impl<'a, 'tcx> WfPredicates<'a, 'tcx> {
self.out.extend(obligations);
}

self.compute_projection_args(data.args);
data.args.visit_with(self);
}

fn compute_projection_args(&mut self, args: GenericArgsRef<'tcx>) {
Expand Down Expand Up @@ -698,8 +698,8 @@ impl<'a, 'tcx> TypeVisitor<TyCtxt<'tcx>> for WfPredicates<'a, 'tcx> {
}

ty::Alias(ty::Projection | ty::Opaque | ty::Weak, data) => {
self.compute_alias(data);
return; // Subtree handled by compute_projection.
let obligations = self.nominal_obligations(data.def_id, data.args);
self.out.extend(obligations);
}
ty::Alias(ty::Inherent, data) => {
self.compute_inherent_projection(data);
Expand Down

0 comments on commit 8d9ad77

Please sign in to comment.