From 5d3626d0f28c5b2c38359211379a3b8532a1e947 Mon Sep 17 00:00:00 2001 From: Sergio Benitez Date: Sat, 9 Sep 2017 02:07:31 -0700 Subject: [PATCH] Add `impl From> for MultiSpan`. --- src/libsyntax_pos/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libsyntax_pos/lib.rs b/src/libsyntax_pos/lib.rs index cba5c812b07ce..27fbca19dcc4c 100644 --- a/src/libsyntax_pos/lib.rs +++ b/src/libsyntax_pos/lib.rs @@ -434,6 +434,12 @@ impl From for MultiSpan { } } +impl From> for MultiSpan { + fn from(spans: Vec) -> MultiSpan { + MultiSpan::from_spans(spans) + } +} + pub const NO_EXPANSION: SyntaxContext = SyntaxContext::empty(); /// Identifies an offset of a multi-byte character in a FileMap