Don't mark #[naked] as used when checking #[track_caller]

This commit is contained in:
Tomasz Miąsko 2020-11-24 00:00:00 +00:00
parent 25a691003c
commit bdc1d9774b

View File

@ -171,7 +171,7 @@ impl CheckAttrVisitor<'tcx> {
target: Target,
) -> bool {
match target {
_ if self.tcx.sess.contains_name(attrs, sym::naked) => {
_ if attrs.iter().any(|attr| attr.has_name(sym::naked)) => {
struct_span_err!(
self.tcx.sess,
*attr_span,