-
-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Stabilize core::panic::Location::caller #72448
Copy link
Copy link
Closed
Labels
F-track_caller`#![feature(track_caller)]``#![feature(track_caller)]`T-libs-api[DEPRECATED; DO NOT USE][DEPRECATED; DO NOT USE]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.
Description
Activity
Metadata
Metadata
Assignees
Labels
F-track_caller`#![feature(track_caller)]``#![feature(track_caller)]`T-libs-api[DEPRECATED; DO NOT USE][DEPRECATED; DO NOT USE]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.
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