Closed
Description
opened on Apr 6, 2020
Context: #69251 (comment)
Suppose we have:
extern "Rust" {
#[track_caller]
fn bar();
}
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 the Location
. When calling bar()
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 the extern "Rust"
block resides.
I've opened this issue to seek some clarity on what @eddyb meant as neither me nor @anp fully understood.
Activity