Skip to content

Commit

Permalink
Update to latest nightly's API
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Nov 19, 2017
1 parent a5aa9b9 commit 998f642
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ impl fmt::Debug for TokenTreeIter {
}
}

#[derive(Copy, Clone, Default)]
#[derive(Copy, Clone)]
pub struct Span(proc_macro::Span);

impl Span {
Expand All @@ -168,6 +168,12 @@ impl Span {
}
}

impl Default for Span {
fn default() -> Span {
Span(proc_macro::Span::def_site())
}
}

impl fmt::Debug for Span {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
self.0.fmt(f)
Expand Down

0 comments on commit 998f642

Please sign in to comment.