Skip to content

Commit 6446f19

Browse files
committed
Permit #[target_feature] on method implementations
1 parent e8566fb commit 6446f19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc/hir/check_attr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ impl CheckAttrVisitor<'tcx> {
278278
/// Checks if the `#[target_feature]` attribute on `item` is valid. Returns `true` if valid.
279279
fn check_target_feature(&self, attr: &Attribute, span: &Span, target: Target) -> bool {
280280
match target {
281-
Target::Fn => true,
281+
Target::Fn | Target::Method { body: true } => true,
282282
_ => {
283283
self.tcx.sess
284284
.struct_span_err(attr.span, "attribute should be applied to a function")

0 commit comments

Comments
 (0)