Skip to content

Commit

Permalink
Rollup merge of rust-lang#44450 - SergioBenitez:master, r=nrc
Browse files Browse the repository at this point in the history
Add `impl From<Vec<Span>> for MultiSpan`.

A simple `impl`.

r? @nrc
  • Loading branch information
GuillaumeGomez committed Sep 13, 2017
2 parents f6c9f1b + 5d3626d commit 7d1053b
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 7d1053b

Please sign in to comment.