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

FIX - Document mocked Span::start and Span::end methods #268

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,8 @@ impl Span {

/// Get the starting line/column in the source file for this span.
///
/// This method requires the `"span-locations"` feature to be enabled.
/// This method requires the `"span-locations"` feature to be enabled and to be on `nightly`. On `stable` rust this
/// currently returns a mocked LineColumn (`LineColumn { line: 0, column: 0 }`).
#[cfg(span_locations)]
pub fn start(&self) -> LineColumn {
let imp::LineColumn { line, column } = self.inner.start();
Expand All @@ -445,7 +446,8 @@ impl Span {

/// Get the ending line/column in the source file for this span.
///
/// This method requires the `"span-locations"` feature to be enabled.
/// This method requires the `"span-locations"` feature to be enabled and to be on `nightly`. On `stable` rust this
/// currently returns a mocked LineColumn (`LineColumn { line: 0, column: 0 }`).
#[cfg(span_locations)]
pub fn end(&self) -> LineColumn {
let imp::LineColumn { line, column } = self.inner.end();
Expand Down