Skip to content

Commit

Permalink
Okay actually check only alias TYPES
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Apr 15, 2024
1 parent 84e729a commit c9b6f83
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 c9b6f83

Please sign in to comment.