Skip to content

Commit 42e1e7b

Browse files
committed
Span::{before, after}Span::{start, end}
1 parent bae491b commit 42e1e7b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

proc_macro/src/bridge/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ macro_rules! with_api {
9595
fn parent($self: $S::Span) -> Option<$S::Span>;
9696
fn source($self: $S::Span) -> $S::Span;
9797
fn byte_range($self: $S::Span) -> Range<usize>;
98-
fn before($self: $S::Span) -> $S::Span;
99-
fn after($self: $S::Span) -> $S::Span;
98+
fn start($self: $S::Span) -> $S::Span;
99+
fn end($self: $S::Span) -> $S::Span;
100100
fn join($self: $S::Span, other: $S::Span) -> Option<$S::Span>;
101101
fn subspan($self: $S::Span, start: Bound<usize>, end: Bound<usize>) -> Option<$S::Span>;
102102
fn resolved_at($self: $S::Span, at: $S::Span) -> $S::Span;

proc_macro/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -495,14 +495,14 @@ impl Span {
495495

496496
/// Creates an empty span pointing to directly before this span.
497497
#[unstable(feature = "proc_macro_span_shrink", issue = "87552")]
498-
pub fn before(&self) -> Span {
499-
Span(self.0.before())
498+
pub fn start(&self) -> Span {
499+
Span(self.0.start())
500500
}
501501

502502
/// Creates an empty span pointing to directly after this span.
503503
#[unstable(feature = "proc_macro_span_shrink", issue = "87552")]
504-
pub fn after(&self) -> Span {
505-
Span(self.0.after())
504+
pub fn end(&self) -> Span {
505+
Span(self.0.end())
506506
}
507507

508508
/// Creates a new span encompassing `self` and `other`.

0 commit comments

Comments
 (0)