Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
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
Next Next commit
proc_macro: Stabilize Span::resolved_at and Span::located_at
  • Loading branch information
petrochenkov committed Apr 25, 2020
commit df99de522a17e7a0c4b75dfdad596862081127d5
4 changes: 2 additions & 2 deletions src/libproc_macro/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,14 +352,14 @@ impl Span {

/// Creates a new span with the same line/column information as `self` but
/// that resolves symbols as though it were at `other`.
#[unstable(feature = "proc_macro_span", issue = "54725")]
#[stable(feature = "proc_macro_span_resolved_at", since = "1.43.0")]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So maybe I'm being stupid but since this was merged on the 25th April shouldn't this be since = "1.44.0" what with 1.43.0 being released on the 23rd April

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With 1.43 released before this was merged, it's actually going to be stabilized in 1.45 (the GitHub milestone this PR is assigned to is also the one for 1.45). I've already opened #71574 to fix the attribute.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I'm not crazy? Good to know :-)

pub fn resolved_at(&self, other: Span) -> Span {
Span(self.0.resolved_at(other.0))
}

/// Creates a new span with the same name resolution behavior as `self` but
/// with the line/column information of `other`.
#[unstable(feature = "proc_macro_span", issue = "54725")]
#[stable(feature = "proc_macro_span_located_at", since = "1.43.0")]
pub fn located_at(&self, other: Span) -> Span {
other.resolved_at(*self)
}
Expand Down