Reduce use of local_def_id_to_hir_id.
This commit is contained in:
parent
ebcc847369
commit
67727aa7c3
39 changed files with 182 additions and 237 deletions
|
@ -409,8 +409,9 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
|
|||
let generics = tcx.generics_of(self.mir_def_id());
|
||||
let param = generics.type_param(¶m_ty, tcx);
|
||||
if let Some(generics) = tcx
|
||||
.hir()
|
||||
.get_generics(tcx.typeck_root_def_id(self.mir_def_id().to_def_id()))
|
||||
.typeck_root_def_id(self.mir_def_id().to_def_id())
|
||||
.as_local()
|
||||
.and_then(|def_id| tcx.hir().get_generics(def_id))
|
||||
{
|
||||
suggest_constraining_type_param(
|
||||
tcx,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue