Skip to content

Commit bf6b54b

Browse files
committed
Stabilize proc_macro::Span::{start,end,line,column,file,local_file}.
1 parent f433fa4 commit bf6b54b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

library/proc_macro/src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -513,29 +513,29 @@ impl Span {
513513
}
514514

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

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

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

535535
/// The one-indexed column of the source file where the span starts.
536536
///
537537
/// To obtain the column of the span's end, use `span.end().column()`.
538-
#[unstable(feature = "proc_macro_span", issue = "54725")]
538+
#[stable(feature = "proc_macro_span_location", since = "CURRENT_RUSTC_VERSION")]
539539
pub fn column(&self) -> usize {
540540
self.0.column()
541541
}
@@ -544,7 +544,7 @@ impl Span {
544544
///
545545
/// This might not correspond to a valid file system path.
546546
/// It might be remapped, or might be an artificial path such as `"<macro expansion>"`.
547-
#[unstable(feature = "proc_macro_span", issue = "54725")]
547+
#[stable(feature = "proc_macro_span_location", since = "CURRENT_RUSTC_VERSION")]
548548
pub fn file(&self) -> String {
549549
self.0.file()
550550
}
@@ -554,7 +554,7 @@ impl Span {
554554
/// This is the actual path on disk. It is unaffected by path remapping.
555555
///
556556
/// This path should not be embedded in the output of the macro; prefer `file()` instead.
557-
#[unstable(feature = "proc_macro_span", issue = "54725")]
557+
#[stable(feature = "proc_macro_span_location", since = "CURRENT_RUSTC_VERSION")]
558558
pub fn local_file(&self) -> Option<PathBuf> {
559559
self.0.local_file().map(|s| PathBuf::from(s))
560560
}

0 commit comments

Comments
 (0)