-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed as not planned
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-panicArea: Panicking machineryArea: Panicking machineryS-needs-infoStatus: The issue lacks details necessary to triage or act on it.Status: The issue lacks details necessary to triage or act on it.S-needs-reproStatus: This issue has no reproduction and needs a reproduction to make progress.Status: This issue has no reproduction and needs a reproduction to make progress.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Code
pub trait Foo {
#[track_caller]
fn foo(&self);
}
Current output
empty
Desired output
warning: `#[track_caller]` is ignored on function prototypes
--> src/main.rs:2:5
|
2 | #[track_caller]
| ^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_attributes)]` on by default
Rationale and extra context
No response
Other cases
Rust Version
rustc 1.88.0-nightly (a15cce269 2025-04-17)
binary: rustc
commit-hash: a15cce2690e8fab72422515c9dc02c6fbc506733
commit-date: 2025-04-17
host: aarch64-unknown-linux-gnu
release: 1.88.0-nightly
LLVM version: 20.1.2
Anything else?
No response
Metadata
Metadata
Assignees
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-panicArea: Panicking machineryArea: Panicking machineryS-needs-infoStatus: The issue lacks details necessary to triage or act on it.Status: The issue lacks details necessary to triage or act on it.S-needs-reproStatus: This issue has no reproduction and needs a reproduction to make progress.Status: This issue has no reproduction and needs a reproduction to make progress.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.