-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.F-track_caller`#![feature(track_caller)]``#![feature(track_caller)]`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.T-langRelevant to the language teamRelevant to the language team
Description
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.
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.F-track_caller`#![feature(track_caller)]``#![feature(track_caller)]`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.T-langRelevant to the language teamRelevant to the language team