Skip to content

Commit 722cb35

Browse files
Make deny for crater
1 parent 699748b commit 722cb35

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ impl<S: Stage> NoArgsAttributeParser<S> for ColdParser {
5757
Allow(Target::Fn),
5858
Allow(Target::Method(MethodKind::Trait { body: true })),
5959
Allow(Target::Method(MethodKind::TraitImpl)),
60+
Error(Target::Method(MethodKind::Trait { body: false })),
6061
Allow(Target::Method(MethodKind::Inherent)),
6162
Allow(Target::ForeignFn),
6263
Allow(Target::Closure),

compiler/rustc_attr_parsing/src/attributes/link_attrs.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,7 @@ impl<S: Stage> SingleAttributeParser<S> for LinkSectionParser {
472472
Allow(Target::Method(MethodKind::Inherent)),
473473
Allow(Target::Method(MethodKind::Trait { body: true })),
474474
Allow(Target::Method(MethodKind::TraitImpl)),
475+
Error(Target::Method(MethodKind::Trait { body: false })),
475476
]);
476477
const TEMPLATE: AttributeTemplate = template!(
477478
NameValueStr: "name",
@@ -592,7 +593,7 @@ impl<S: Stage> SingleAttributeParser<S> for LinkageParser {
592593
Allow(Target::Static),
593594
Allow(Target::ForeignStatic),
594595
Allow(Target::ForeignFn),
595-
Warn(Target::Method(MethodKind::Trait { body: false })), // Not inherited
596+
Error(Target::Method(MethodKind::Trait { body: false })), // Not inherited
596597
]);
597598

598599
const TEMPLATE: AttributeTemplate = template!(NameValueStr: [

0 commit comments

Comments
 (0)