-
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.
Description
In call chains, the newly stabilized feature to make panics point to useful locations doesn't report the actual call site of the expand/unwrap call, but to the start of the call chain.
let v = None;
//v---- reported panic location
v.map(|x: ()| x)
.map(|_| ())
//v---- expected panic location
.expect("test");
It should rather point to the expect/unwrap instead. You can have multiple such expects/unwraps in your chain.
Edit: happens on latest nightly as well as on the 1.42.0 stable release.
Emilgardis, Aaron1011 and mankinskin
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.