Skip to content

Commit

Permalink
fix rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed May 4, 2020
1 parent 5d64e91 commit b13f234
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/librustc_middle/ty/error.rs
Expand Up @@ -410,8 +410,11 @@ impl<'tcx> TyCtxt<'tcx> {
}
let hir = self.hir();
let mut note = true;
if let Some(generics) = hir
.as_local_hir_id(generics.type_param(p, self).def_id)
if let Some(generics) = generics
.type_param(p, self)
.def_id
.as_local()
.map(|id| hir.as_local_hir_id(id))
.and_then(|id| self.hir().find(self.hir().get_parent_node(id)))
.as_ref()
.and_then(|node| node.generics())
Expand Down
5 changes: 3 additions & 2 deletions src/librustc_typeck/check/op.rs
Expand Up @@ -954,8 +954,9 @@ fn suggest_constraining_param(
let def_id = hir.body_owner_def_id(hir::BodyId { hir_id: body_id });
let generics = tcx.generics_of(def_id);
let param_def_id = generics.type_param(&p, tcx).def_id;
if let Some(generics) = hir
.as_local_hir_id(param_def_id)
if let Some(generics) = param_def_id
.as_local()
.map(|id| hir.as_local_hir_id(id))
.and_then(|id| hir.find(hir.get_parent_item(id)))
.as_ref()
.and_then(|node| node.generics())
Expand Down

0 comments on commit b13f234

Please sign in to comment.