Skip to content

Commit

Permalink
Add impl From<Vec<Span>> for MultiSpan.
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioBenitez committed Sep 9, 2017
1 parent dee6d0f commit 5d3626d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/libsyntax_pos/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,12 @@ impl From<Span> for MultiSpan {
}
}

impl From<Vec<Span>> for MultiSpan {
fn from(spans: Vec<Span>) -> MultiSpan {
MultiSpan::from_spans(spans)
}
}

pub const NO_EXPANSION: SyntaxContext = SyntaxContext::empty();

/// Identifies an offset of a multi-byte character in a FileMap
Expand Down

0 comments on commit 5d3626d

Please sign in to comment.