Skip to content

Commit 3d429d8

Browse files
authored
Rollup merge of rust-lang#103197 - est31:stabilize_proc_macro_source_text, r=petrochenkov
Stabilize proc_macro::Span::source_text Splits `proc_macro::Span::source_text` into a new feature gate and stabilizes it. The [FCP is complete](rust-lang#101991 (comment)). ```Rust impl Span { pub fn source_text(&self) -> Option<String>; } ``` Closes rust-lang#101991
2 parents 021551b + d89fb1d commit 3d429d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: library/proc_macro/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ impl Span {
546546
/// Note: The observable result of a macro should only rely on the tokens and
547547
/// not on this source text. The result of this function is a best effort to
548548
/// be used for diagnostics only.
549-
#[unstable(feature = "proc_macro_span", issue = "54725")]
549+
#[stable(feature = "proc_macro_source_text", since = "CURRENT_RUSTC_VERSION")]
550550
pub fn source_text(&self) -> Option<String> {
551551
self.0.source_text()
552552
}

0 commit comments

Comments
 (0)