Skip to content
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

Tracking Issue for const_caller_location #76156

Closed
1 of 3 tasks
ArekPiekarz opened this issue Aug 31, 2020 · 16 comments · Fixed by #122291
Closed
1 of 3 tasks

Tracking Issue for const_caller_location #76156

ArekPiekarz opened this issue Aug 31, 2020 · 16 comments · Fixed by #122291
Labels
C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@ArekPiekarz
Copy link
Contributor

ArekPiekarz commented Aug 31, 2020

This is a tracking issue for the const part of RFC 2091: track_caller (rust-lang/rfcs#2091).
The feature gate for the issue is #![feature(const_caller_location)].

About tracking issues

Tracking issues are used to record the overall progress of implementation.
They are also uses as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.

Steps

Unresolved Questions

Implementation history

#72445

@ArekPiekarz ArekPiekarz added the C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. label Aug 31, 2020
@ArekPiekarz
Copy link
Contributor Author

I wasn't sure if there was anything else needed to fully implement the RFC for const, but I preferred to stay on the safe side and left it unchecked when creating this issue.

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Sep 5, 2020
…racking_issue, r=joshtriplett

Update tracking issue for const_caller_location

Update the tracking issue to rust-lang#76156, as suggested in rust-lang#76105.
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Sep 6, 2020
…racking_issue, r=joshtriplett

Update tracking issue for const_caller_location

Update the tracking issue to rust-lang#76156, as suggested in rust-lang#76105.
bors added a commit to rust-lang-ci/rust that referenced this issue Sep 6, 2020
…cking_issue, r=joshtriplett

Update tracking issue for const_caller_location

Update the tracking issue to rust-lang#76156, as suggested in rust-lang#76105.
@davidbarsky
Copy link
Contributor

Out of curiosity, are there any blockers to this being stabilized, other than getting meaningful feedback on its current state? I ask because a stable, const Location::caller would be incredibly valuable for tokio-rs/tracing, as it'd allow tracing to get rid of some pretty gnarly macros.

@pnkfelix
Copy link
Member

pnkfelix commented Oct 14, 2022

Visiting for T-compiler steering backlog bonanza.

We believe this feature will be most useful in concert with PR #101030. But the latter has not been merged yet.

So we're going to treat this as "needs to bake", and after PR #101030 has gotten some exercise in the wild, then we can talk about stabilizing them as a set.

@rustbot label: S-tracking-needs-to-bake

@rustbot rustbot added the S-tracking-needs-to-bake Status: The implementation is "complete" but it needs time to bake. label Oct 14, 2022
@wesleywiser
Copy link
Member

@davidbarsky out of curiosity, does tracing need #101030 to be stabilized as well or just this feature?

@pnkfelix
Copy link
Member

pnkfelix commented Oct 14, 2022

To put @wesleywiser 's note above in other words: there is the question of whether #102911 should be merged in with this tracking issue. That's basically a question of whether this functionality is sufficiently useful on its own, without the ability to observe Location fields, that it would be worth stabilizing #76156 without stabilizing #102911.

lyming2007 pushed a commit to lyming2007/rust that referenced this issue Oct 21, 2022
@davidbarsky
Copy link
Contributor

@wesleywiser @pnkfelix sorry for the delay in responding! This post was sitting unpublished in my tabs 😓. Anyways: tracing will need #102911 in addition to #76156 because Metadata has a de-facto requirement to be 'static from Subscribers. tracing 0.2 might loosen this requirement to use Cow under the hood, but I'm not sure when that will happen.

@robertbastian
Copy link
Contributor

This has baked for a while now and hasn't lit any fires. Can we get this on track for stabilisation?

@robertbastian
Copy link
Contributor

Bump

@Amanieu
Copy link
Member

Amanieu commented Mar 19, 2024

Libs-api is happy to to stabilize this, but we would like to check with @rust-lang/wg-const-eval first.

@oli-obk
Copy link
Contributor

oli-obk commented Mar 19, 2024

I don't see any issues with this. The impl has been tried and tested on the miri side extensively.

@Amanieu Amanieu added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Mar 22, 2024
@Amanieu
Copy link
Member

Amanieu commented Mar 22, 2024

@rfcbot fcp merge

@rfcbot
Copy link

rfcbot commented Mar 22, 2024

Team member @Amanieu 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 Mar 22, 2024
@Amanieu
Copy link
Member

Amanieu commented Mar 22, 2024

To be clear, this FCP is intended to also cover #102911 which const-stabilizes the other methods on Location.

@rfcbot rfcbot added the final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. label Mar 22, 2024
@rfcbot
Copy link

rfcbot commented Mar 22, 2024

🔔 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 Mar 22, 2024
@rfcbot rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. to-announce Announce this issue on triage meeting and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Apr 1, 2024
@rfcbot
Copy link

rfcbot commented Apr 1, 2024

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

This will be merged soon.

@apiraino apiraino removed the to-announce Announce this issue on triage meeting label Apr 4, 2024
@dtolnay dtolnay removed the S-tracking-needs-to-bake Status: The implementation is "complete" but it needs time to bake. label Apr 5, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Apr 6, 2024
…ields, r=dtolnay

Stabilize `const_caller_location` and `const_location_fields`

Closes rust-lang#102911. Closes rust-lang#76156.

tests: [library/core/tests/panic/location.rs](https://github.com/rust-lang/rust/blob/3521a2f2f317cb978063842485c7d1bc86ec82b6/library/core/tests/panic/location.rs)

API:
```rust
// core::panic::location
impl Location {
    pub const fn caller() -> &'static Location<'static>;
    pub const fn file(&self) -> &str;
    pub const fn line(&self) -> u32;
    pub const fn column(&self) -> u32;
}
```
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Apr 6, 2024
…ields, r=dtolnay

Stabilize `const_caller_location` and `const_location_fields`

Closes rust-lang#102911. Closes rust-lang#76156.

tests: [library/core/tests/panic/location.rs](https://github.com/rust-lang/rust/blob/3521a2f2f317cb978063842485c7d1bc86ec82b6/library/core/tests/panic/location.rs)

API:
```rust
// core::panic::location
impl Location {
    pub const fn caller() -> &'static Location<'static>;
    pub const fn file(&self) -> &str;
    pub const fn line(&self) -> u32;
    pub const fn column(&self) -> u32;
}
```
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Apr 6, 2024
…ields, r=dtolnay

Stabilize `const_caller_location` and `const_location_fields`

Closes rust-lang#102911. Closes rust-lang#76156.

tests: [library/core/tests/panic/location.rs](https://github.com/rust-lang/rust/blob/3521a2f2f317cb978063842485c7d1bc86ec82b6/library/core/tests/panic/location.rs)

API:
```rust
// core::panic::location
impl Location {
    pub const fn caller() -> &'static Location<'static>;
    pub const fn file(&self) -> &str;
    pub const fn line(&self) -> u32;
    pub const fn column(&self) -> u32;
}
```
@bors bors closed this as completed in cb7f1ee Apr 6, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Apr 6, 2024
Rollup merge of rust-lang#122291 - lilasta:stabilize_const_location_fields, r=dtolnay

Stabilize `const_caller_location` and `const_location_fields`

Closes rust-lang#102911. Closes rust-lang#76156.

tests: [library/core/tests/panic/location.rs](https://github.com/rust-lang/rust/blob/3521a2f2f317cb978063842485c7d1bc86ec82b6/library/core/tests/panic/location.rs)

API:
```rust
// core::panic::location
impl Location {
    pub const fn caller() -> &'static Location<'static>;
    pub const fn file(&self) -> &str;
    pub const fn line(&self) -> u32;
    pub const fn column(&self) -> u32;
}
```
@Ciel-MC
Copy link

Ciel-MC commented Apr 9, 2024

Yipee, when is this getting stabilized? :D

Edit: Nvm I can see it on the nightly docs that it is 1.79, maybe I should go read up on what final comment period means ;-;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.