-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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_location_fields
#102911
Comments
Constify `Location` methods Tracking issue: rust-lang#102911 Example: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=4789884c2f16ec4fb0e0405d86b794f5
anything needed before both this and #76156 can be stabilized? |
@programmerjake I think there is no blocker for stabilization since the functions just return a field value. |
@programmerjake @lilasta doesn't seem to be any blockers here and this has sat long enough so all what's missing is someone sending the pr to stabilise it, so feel free to do so if you are interested |
FCP started in #76156 which also covers this issue. |
…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; } ```
…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; } ```
…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; } ```
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; } ```
Feature gate:
#![feature(const_location_fields)]
This is a tracking issue for
core::panic::Location
methods asconst
functions.Public API
Steps / History
Location
methods #101030const_caller_location
andconst_location_fields
#122291Unresolved Questions
The text was updated successfully, but these errors were encountered: