@@ -190,7 +190,6 @@ impl<'a> Location<'a> {
190
190
/// # Examples
191
191
///
192
192
/// ```
193
- /// #![feature(track_caller)]
194
193
/// use core::panic::Location;
195
194
///
196
195
/// /// Returns the [`Location`] at which it is called.
@@ -206,7 +205,7 @@ impl<'a> Location<'a> {
206
205
///
207
206
/// let fixed_location = get_just_one_location();
208
207
/// assert_eq!(fixed_location.file(), file!());
209
- /// assert_eq!(fixed_location.line(), 15 );
208
+ /// assert_eq!(fixed_location.line(), 14 );
210
209
/// assert_eq!(fixed_location.column(), 5);
211
210
///
212
211
/// // running the same untracked function in a different location gives us the same result
@@ -217,7 +216,7 @@ impl<'a> Location<'a> {
217
216
///
218
217
/// let this_location = get_caller_location();
219
218
/// assert_eq!(this_location.file(), file!());
220
- /// assert_eq!(this_location.line(), 29 );
219
+ /// assert_eq!(this_location.line(), 28 );
221
220
/// assert_eq!(this_location.column(), 21);
222
221
///
223
222
/// // running the tracked function in a different location produces a different value
@@ -226,13 +225,8 @@ impl<'a> Location<'a> {
226
225
/// assert_ne!(this_location.line(), another_location.line());
227
226
/// assert_ne!(this_location.column(), another_location.column());
228
227
/// ```
229
- // FIXME: When stabilizing this method, please also update the documentation
230
- // of `intrinsics::caller_location`.
231
- #[ unstable(
232
- feature = "track_caller" ,
233
- reason = "uses #[track_caller] which is not yet stable" ,
234
- issue = "47809"
235
- ) ]
228
+ #[ stable( feature = "track_caller" , since = "1.46.0" ) ]
229
+ #[ rustc_const_unstable( feature = "const_caller_location" , issue = "47809" ) ]
236
230
#[ track_caller]
237
231
pub const fn caller ( ) -> & ' static Location < ' static > {
238
232
crate :: intrinsics:: caller_location ( )
0 commit comments