Skip to content

Commit

Permalink
remove unnecessary .ok() calls
Browse files Browse the repository at this point in the history
  • Loading branch information
lcnr committed May 26, 2023
1 parent e7fa993 commit b6b9611
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions compiler/rustc_trait_selection/src/solve/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,21 @@ impl<'a, 'tcx> EvalCtxt<'a, 'tcx> {

let mut candidates = Vec::new();
// LHS normalizes-to RHS
candidates.extend(
evaluate_normalizes_to(self, alias_lhs, rhs, direction, Invert::No).ok(),
);
candidates.extend(evaluate_normalizes_to(
self,
alias_lhs,
rhs,
direction,
Invert::No,
));
// RHS normalizes-to RHS
candidates.extend(
evaluate_normalizes_to(self, alias_rhs, lhs, direction, Invert::Yes).ok(),
);
candidates.extend(evaluate_normalizes_to(
self,
alias_rhs,
lhs,
direction,
Invert::Yes,
));
// Relate via substs
let subst_relate_response = self.probe(|ecx| {
let span = tracing::span!(
Expand Down

0 comments on commit b6b9611

Please sign in to comment.