Skip to content

Commit 5d3626d

Browse files
committed
Add impl From<Vec<Span>> for MultiSpan.
1 parent dee6d0f commit 5d3626d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/libsyntax_pos/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,12 @@ impl From<Span> for MultiSpan {
434434
}
435435
}
436436

437+
impl From<Vec<Span>> for MultiSpan {
438+
fn from(spans: Vec<Span>) -> MultiSpan {
439+
MultiSpan::from_spans(spans)
440+
}
441+
}
442+
437443
pub const NO_EXPANSION: SyntaxContext = SyntaxContext::empty();
438444

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

0 commit comments

Comments
 (0)