-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Stabilize core::panic::Location::caller #72448
Copy link
Copy link
Closed
Labels
F-track_caller`#![feature(track_caller)]``#![feature(track_caller)]`T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.
Metadata
Metadata
Assignees
Labels
F-track_caller`#![feature(track_caller)]``#![feature(track_caller)]`T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
The lang FCP for
#[track_caller]is happening in #72445. This is a libs FCP for https://doc.rust-lang.org/nightly/std/panic/struct.Location.html#method.caller which is under the same feature gate and required for making use of#[track_caller]in library code.Refer to @anp's stabilization report and the method's example code.
In particular:
The return type is
&'static Location<'static>which resembles the return type of std::panic::PanicInfo::location (Option<&'a Location<'a>>) but static and non-optional.The location points to the outermost call site not inside of a
#[track_caller]function.@rust-lang/libs