about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTomasz Miąsko <tomasz.miasko@gmail.com>2020-11-24 00:00:00 +0000
committerTomasz Miąsko <tomasz.miasko@gmail.com>2020-11-24 20:45:09 +0100
commitbdc1d9774b7f963e87c3ca1946e00a44d5bdbfe5 (patch)
tree9a8ba8d316f6a97c4d256a5971c3f695cdc372b7
parent25a691003cf6676259ee7d4bed05b43cb6283cea (diff)
downloadrust-bdc1d9774b7f963e87c3ca1946e00a44d5bdbfe5.tar.gz
rust-bdc1d9774b7f963e87c3ca1946e00a44d5bdbfe5.zip
Don't mark #[naked] as used when checking #[track_caller]
-rw-r--r--compiler/rustc_passes/src/check_attr.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs
index 7679582f881..c94de9aec30 100644
--- a/compiler/rustc_passes/src/check_attr.rs
+++ b/compiler/rustc_passes/src/check_attr.rs
@@ -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,