-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Tracking issue for RFC 2091: Implicit caller location #47809
Copy link
Copy link
Closed
Labels
B-RFC-approvedBlocker: Approved by a merged RFC but not yet implemented.Blocker: Approved by a merged RFC but not yet implemented.B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCE-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.F-track_caller`#![feature(track_caller)]``#![feature(track_caller)]`T-langRelevant to the language teamRelevant to the language teamT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
B-RFC-approvedBlocker: Approved by a merged RFC but not yet implemented.Blocker: Approved by a merged RFC but not yet implemented.B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCE-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.F-track_caller`#![feature(track_caller)]``#![feature(track_caller)]`T-langRelevant to the language teamRelevant to the language teamT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
This is a tracking issue for the RFC "Implicit caller location" (rust-lang/rfcs#2091).
Steps:
Unresolved questions:
If we want to support adding#[track_caller]to trait methods, the redirectionpass/query/whatever should be placed after monomorphization, not before. Currently the RFC
simply prohibits applying
#[track_caller]to trait methods as a future-proofing measure.Diverging functions should be supported.The closurefoo::{{closure}}should inherit most attributes applied to the functionfoo, inparticular
#[inline],#[cold],#[naked]and also the ABI. Currently a procedural macrowon't see any of these, nor would there be anyway to apply these attributes to a closure.
Therefore,
#[rustc_implicit_caller_location]currently will reject#[naked]and ABI, andleaving
#[inline]and#[cold]mean no-op. There is no semantic reason why these cannot beused though.