Closed
Description
Feature gate: #![feature(proc_macro_span_shrink)]
This feature adds span.start()
and span.end()
which give empty spans right at the start and end of the span. (Just like shrink_to_lo()
and shrink_to_hi()
inside rustc.)
Public API
// proc_macro
impl Span {
pub fn start(&self) -> Span;
pub fn end(&self) -> Span;
}
Steps / History
- Implementation: Add proc_macro::Span::{before, after}. #86165
- Rename to
start
andend
: Implement proposed API forproc_macro_span
#111571 - Merge tracking with Tracking issue for
proc_macro::Span
inspection APIs #54725
Unresolved Questions
- None yet.