#[track_caller]
on fn
s in extern "Rust"
#70830
Labels
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
F-track_caller
`#![feature(track_caller)]`
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
Context: #69251 (comment)
Suppose we have:
This currently produces an error, but @eddyb suggested that it could be allowed.
Then comes the question of what this would mean. One way to imagine this is that we'd alter the ABI of
fn bar
, as we usually do for#[track_caller]
functions, to accept an additional parameter for theLocation
. When callingbar()
we'd then propagate the location, again as usual.However, the place which actually defines
fn bar() { ... }
would not be aware of the#[track_caller]
annotation, so it seems to me that we'd have to insert a shim where theextern "Rust"
block resides.I've opened this issue to seek some clarity on what @eddyb meant as neither me nor @anp fully understood.
The text was updated successfully, but these errors were encountered: