From b5dfeba0e14c00c5cc91c935bad5633fa2df8461 Mon Sep 17 00:00:00 2001 From: Zalathar Date: Wed, 19 Jun 2024 17:02:19 +1000 Subject: [PATCH] coverage: Forbid multiple `#[coverage(..)]` attributes It might make sense to allow this in the future, if we add values that aren't mutually exclusive, but for now having multiple coverage attributes on one item is useless. --- compiler/rustc_feature/src/builtin_attrs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_feature/src/builtin_attrs.rs b/compiler/rustc_feature/src/builtin_attrs.rs index 5e83e0d27e1..7185240d245 100644 --- a/compiler/rustc_feature/src/builtin_attrs.rs +++ b/compiler/rustc_feature/src/builtin_attrs.rs @@ -479,7 +479,7 @@ pub struct BuiltinAttribute { ), gated!( coverage, Normal, template!(Word, List: "on|off"), - WarnFollowing, EncodeCrossCrate::No, + ErrorPreceding, EncodeCrossCrate::No, coverage_attribute, experimental!(coverage) ),