about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorJana Dönszelmann <jana@donsz.nl>2025-06-21 13:04:24 +0200
committerJana Dönszelmann <jana@donsz.nl>2025-06-24 23:00:31 +0200
commitf9cdf3fd746bc8a20d2bfd62189180ea69029627 (patch)
treeca416cc1778640866feb39bd2246a9d8acb62cfd /compiler
parent40a33af0f3dc8e16b2b954d7af3dd782f7b13497 (diff)
downloadrust-f9cdf3fd746bc8a20d2bfd62189180ea69029627.tar.gz
rust-f9cdf3fd746bc8a20d2bfd62189180ea69029627.zip
fix 142783
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_passes/src/check_attr.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs
index fc190b92816..7eb74b38dab 100644
--- a/compiler/rustc_passes/src/check_attr.rs
+++ b/compiler/rustc_passes/src/check_attr.rs
@@ -722,9 +722,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
             // erroneously allowed it and some crates used it accidentally, to be compatible
             // with crates depending on them, we can't throw an error here.
             Target::Field | Target::Arm | Target::MacroDef => {
-                for attr in attrs {
-                    self.inline_attr_str_error_with_macro_def(hir_id, attr.span(), "track_caller");
-                }
+                self.inline_attr_str_error_with_macro_def(hir_id, attr_span, "track_caller");
             }
             _ => {
                 self.dcx().emit_err(errors::TrackedCallerWrongLocation {