1
Fork 0

Do not store attrs in FnKind.

This commit is contained in:
Camille GILLOT 2020-11-27 09:24:42 +01:00
parent f5dc5dcca3
commit 8e816056a5
16 changed files with 51 additions and 70 deletions

View file

@ -15,7 +15,7 @@ crate fn check<'tcx>(tcx: TyCtxt<'tcx>, body: &Body<'tcx>) {
let hir_id = tcx.hir().local_def_id_to_hir_id(def_id);
if let Some(fn_like_node) = FnLikeNode::from_node(tcx.hir().get(hir_id)) {
if let FnKind::Closure(_) = fn_like_node.kind() {
if let FnKind::Closure = fn_like_node.kind() {
// closures can't recur, so they don't matter.
return;
}