Skip to content

Stabilize proc_macro::Span::{file, local_file}. #140514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

m-ou-se
Copy link
Member

@m-ou-se m-ou-se commented Apr 30, 2025

Stabilizes this part of #54725:

impl Span {
    pub fn file(&self) -> String; // Mapped/artificial file name, for display purposes.

    pub fn local_file(&self) -> Option<PathBuf>; // Real file name as it exists on the local file system.
}

See also the naming discussion in #139903

@m-ou-se m-ou-se added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. needs-fcp This change is insta-stable, so needs a completed FCP to proceed. S-waiting-on-fcp Status: PR is in FCP and is awaiting for FCP to complete. A-proc-macros Area: Procedural macros labels Apr 30, 2025
@m-ou-se m-ou-se self-assigned this Apr 30, 2025
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 30, 2025
@m-ou-se
Copy link
Member Author

m-ou-se commented Apr 30, 2025

@rfcbot merge

@rfcbot
Copy link
Collaborator

rfcbot commented Apr 30, 2025

Team member @m-ou-se has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Apr 30, 2025
@rust-log-analyzer

This comment has been minimized.

@m-ou-se
Copy link
Member Author

m-ou-se commented Apr 30, 2025

I think we should ship (stable) file and local_file in the same rust version as line and column. So it would be good if we can merge this into 1.88 too. :)

@m-ou-se m-ou-se added this to the 1.88.0 milestone Apr 30, 2025
@rfcbot rfcbot added the final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. label Apr 30, 2025
@rfcbot
Copy link
Collaborator

rfcbot commented Apr 30, 2025

🔔 This is now entering its final comment period, as per the review above. 🔔

@rfcbot rfcbot removed the proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. label Apr 30, 2025
@sam0x17
Copy link

sam0x17 commented Apr 30, 2025

very excited to see this coming to stable, have been waiting for this for years ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-proc-macros Area: Procedural macros disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. needs-fcp This change is insta-stable, so needs a completed FCP to proceed. S-waiting-on-fcp Status: PR is in FCP and is awaiting for FCP to complete. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants