Skip to content
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
8 changes: 4 additions & 4 deletions library/proc_macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -513,29 +513,29 @@ impl Span {
}

/// Creates an empty span pointing to directly before this span.
#[unstable(feature = "proc_macro_span", issue = "54725")]
#[stable(feature = "proc_macro_span_location", since = "CURRENT_RUSTC_VERSION")]
pub fn start(&self) -> Span {
Span(self.0.start())
}

/// Creates an empty span pointing to directly after this span.
#[unstable(feature = "proc_macro_span", issue = "54725")]
#[stable(feature = "proc_macro_span_location", since = "CURRENT_RUSTC_VERSION")]
pub fn end(&self) -> Span {
Span(self.0.end())
}

/// The one-indexed line of the source file where the span starts.
///
/// To obtain the line of the span's end, use `span.end().line()`.
#[unstable(feature = "proc_macro_span", issue = "54725")]
#[stable(feature = "proc_macro_span_location", since = "CURRENT_RUSTC_VERSION")]
pub fn line(&self) -> usize {
self.0.line()
}

/// The one-indexed column of the source file where the span starts.
///
/// To obtain the column of the span's end, use `span.end().column()`.
#[unstable(feature = "proc_macro_span", issue = "54725")]
#[stable(feature = "proc_macro_span_location", since = "CURRENT_RUSTC_VERSION")]
pub fn column(&self) -> usize {
self.0.column()
}
Expand Down
Loading