Skip to content

Implement #[track_caller] attribute. (RFC 2091 4/N)#65881

Merged
bors merged 16 commits intorust-lang:masterfrom
anp:implicit-caller-location
Dec 8, 2019
Merged

Implement #[track_caller] attribute. (RFC 2091 4/N)#65881
bors merged 16 commits intorust-lang:masterfrom
anp:implicit-caller-location

Conversation

@anp
Copy link
Copy Markdown
Contributor

@anp anp commented Oct 27, 2019

Implements the #[track_caller] attribute in both const and codegen contexts.

The const implementation walks up the stack to find the nearest untracked callsite.

The codegen implementation adds an implicit argument to tracked function calls, and populates it with either a call to the previously-landed intrinsic or if the caller has #[track_caller] with a copy of the location passed to the current function.

Also includes a little cleanup and a few comments in the other caller location areas.

Depends on: 65664
RFC 2091 text
Tracking issue
Tracking doc

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

F-track_caller `#![feature(track_caller)]` merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants