Rollup merge of #90071 - cjgillot:no-blocks, r=oli-obk
Remove hir::map::blocks and use FnKind instead The principal tool is `FnLikeNode`, which is not often used and can be easily implemented using `rustc_hir::intravisit::FnKind`.
This commit is contained in:
commit
afdd0c3ade
11 changed files with 47 additions and 260 deletions
|
@ -143,9 +143,8 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
|
|||
// similar to the asyncness fn in rustc_ty_utils::ty
|
||||
let hir_id = self.tcx().hir().local_def_id_to_hir_id(local_def_id);
|
||||
let node = self.tcx().hir().get(hir_id);
|
||||
let fn_like = rustc_middle::hir::map::blocks::FnLikeNode::from_node(node)?;
|
||||
|
||||
Some(fn_like.asyncness())
|
||||
let fn_kind = node.fn_kind()?;
|
||||
Some(fn_kind.asyncness())
|
||||
}
|
||||
|
||||
// Here, we check for the case where the anonymous region
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue