@@ -436,8 +436,13 @@ impl Span {
436
436
437
437
/// Get the starting line/column in the source file for this span.
438
438
///
439
- /// This method requires the `"span-locations"` feature to be enabled and to be on `nightly`. On `stable` rust this
440
- /// currently returns a mocked LineColumn (`LineColumn { line: 0, column: 0 }`).
439
+ /// This method requires the `"span-locations"` feature to be enabled.
440
+ ///
441
+ /// When executing in a procedural macro context, the returned line/column
442
+ /// are only meaningful if compiled with a nightly toolchain. The stable
443
+ /// toolchain does not have this information available. When executing
444
+ /// outside of a procedural macro, such as main.rs or build.rs, the
445
+ /// line/column are always meaningful regardless of toolchain.
441
446
#[ cfg( span_locations) ]
442
447
pub fn start ( & self ) -> LineColumn {
443
448
let imp:: LineColumn { line, column } = self . inner . start ( ) ;
@@ -446,8 +451,13 @@ impl Span {
446
451
447
452
/// Get the ending line/column in the source file for this span.
448
453
///
449
- /// This method requires the `"span-locations"` feature to be enabled and to be on `nightly`. On `stable` rust this
450
- /// currently returns a mocked LineColumn (`LineColumn { line: 0, column: 0 }`).
454
+ /// This method requires the `"span-locations"` feature to be enabled.
455
+ ///
456
+ /// When executing in a procedural macro context, the returned line/column
457
+ /// are only meaningful if compiled with a nightly toolchain. The stable
458
+ /// toolchain does not have this information available. When executing
459
+ /// outside of a procedural macro, such as main.rs or build.rs, the
460
+ /// line/column are always meaningful regardless of toolchain.
451
461
#[ cfg( span_locations) ]
452
462
pub fn end ( & self ) -> LineColumn {
453
463
let imp:: LineColumn { line, column } = self . inner . end ( ) ;
0 commit comments