From c3368bdfa498f0c8fb2267dfb0cb804df8ec6dbb Mon Sep 17 00:00:00 2001 From: David Wood Date: Thu, 26 Sep 2019 17:03:29 +0100 Subject: [PATCH] hir: stop checking codegen fn attrs for constants See linked comment[1] for context. 1: https://github.com/rust-lang/rust/pull/64809#discussion_r328662933 Signed-off-by: David Wood --- src/librustc/hir/check_attr.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustc/hir/check_attr.rs b/src/librustc/hir/check_attr.rs index 283ab0103ec08..fcd5378063190 100644 --- a/src/librustc/hir/check_attr.rs +++ b/src/librustc/hir/check_attr.rs @@ -112,7 +112,7 @@ impl CheckAttrVisitor<'tcx> { return; } - if target == Target::Fn || target == Target::Const { + if target == Target::Fn { self.tcx.codegen_fn_attrs(self.tcx.hir().local_def_id(item.hir_id)); }