Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Tracking Issue for NUL-terminated file names with #[track_caller] #141727

Copy link
Copy link
@Darksonn

Description

@Darksonn
Issue body actions

Feature gate: #![feature(file_with_nul)]

This is a tracking issue for Location::file_with_nul.

This feature allows you to obtain NUL-terminated file names from core::panic::Location when using #[track_caller]. This allows for better error messages in projects performing interop with C/C++.

Public API

// core::panic

pub struct Location<'a>;

impl<'a> Location<'a> {
    pub const fn file_with_nul(&self) -> &'a CStr;
}

Steps / History

(Remember to update the S-tracking-* label when checking boxes.)

Related PRs:

Footnotes

  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html

teor2345

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-panicArea: Panicking machineryArea: Panicking machineryA-rust-for-linuxRelevant for the Rust-for-Linux projectRelevant for the Rust-for-Linux projectC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCI-lang-radarItems that are on lang's radar and will need eventual work or consideration.Items that are on lang's radar and will need eventual work or consideration.P-lang-drag-1Lang team prioritization drag level 1. https://rust-lang.zulipchat.com/#narrow/channel/410516-t-langLang team prioritization drag level 1. https://rust-lang.zulipchat.com/#narrow/channel/410516-t-langT-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

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.