]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_typeck/src/impl_wf_check.rs
Detect match statement intended to be tail expression
[rust.git] / compiler / rustc_typeck / src / impl_wf_check.rs
index c3606ec564aedbdcdcfc4ae0c6a644b29f3265b9..7713381e62e467b8c739cf026e1e6b92f983591d 100644 (file)
@@ -59,7 +59,7 @@ pub fn impl_wf_check(tcx: TyCtxt<'_>) {
     // but it's one that we must perform earlier than the rest of
     // WfCheck.
     for &module in tcx.hir().krate().modules.keys() {
-        tcx.ensure().check_mod_impl_wf(tcx.hir().local_def_id(module));
+        tcx.ensure().check_mod_impl_wf(module);
     }
 }
 
@@ -130,7 +130,7 @@ fn enforce_impl_params_are_constrained(
     // Disallow unconstrained lifetimes, but only if they appear in assoc types.
     let lifetimes_in_associated_types: FxHashSet<_> = impl_item_refs
         .iter()
-        .map(|item_ref| tcx.hir().local_def_id(item_ref.id.hir_id))
+        .map(|item_ref| item_ref.id.def_id)
         .flat_map(|def_id| {
             let item = tcx.associated_item(def_id);
             match item.kind {