Skip to content

Commit

Permalink
remove duplicated code
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Sep 19, 2019
1 parent 09f05d2 commit d64c90d
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/librustc_typeck/check/mod.rs
Expand Up @@ -3384,15 +3384,6 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
// the `?` operator.
for error in errors {
if let ty::Predicate::Trait(predicate) = error.obligation.predicate {
let mut referenced_in = vec![];
for (i, ty) in final_arg_types {
let ty = self.resolve_vars_if_possible(ty);
for ty in ty.walk() {
if ty == predicate.skip_binder().self_ty() {
referenced_in.push(*i);
}
}
}
let mut referenced_in = final_arg_types.iter()
.flat_map(|(i, ty)| {
let ty = self.resolve_vars_if_possible(ty);
Expand Down

0 comments on commit d64c90d

Please sign in to comment.