Skip to content

Add #[track_caller] support to ? #77474

Closed
@yaahc

Description

@yaahc

Right now if you construct an error via its Into implementation as provided by the blanket implementation in std it gives the following location.

Location:
   /home/jlusby/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/convert/mod.rs:545

We should add #[track_caller] to this trait and possibily some of the Try trait implementations so that errors that attempt to track their construction point can correctly point to user code.

cc @anp

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-error-handlingArea: Error handlingC-feature-requestCategory: A feature request, i.e: not implemented / a PR.F-track_caller`#![feature(track_caller)]`PG-error-handlingProject group: Error handling (https://github.com/rust-lang/project-error-handling)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions