Tracking issue for RFC 2091: Implicit caller location · Issue #47809 · rust-lang/rust (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
This is a tracking issue for the RFC "Implicit caller location" (rust-lang/rfcs#2091).
Steps:
- Implement the RFC (cc @rust-lang/compiler -- can anyone write up mentoring instructions?)
- Adjust documentation (see instructions on forge)
- Stabilization PR (see instructions on forge)
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 RFCsimply 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.