about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2017-09-14 22:32:37 -0400
committerGitHub <noreply@github.com>2017-09-14 22:32:37 -0400
commit1e2d6a804e518f4c96916401e11fce47bac489b7 (patch)
tree395bf58f614fd1b894c8cdca8048124de193d409
parent5255ab7e2a0a0c15f9e6973df5b2677194aaabc7 (diff)
parent5d3626d0f28c5b2c38359211379a3b8532a1e947 (diff)
downloadrust-1e2d6a804e518f4c96916401e11fce47bac489b7.tar.gz
rust-1e2d6a804e518f4c96916401e11fce47bac489b7.zip
Rollup merge of #44450 - SergioBenitez:master, r=nrc
Add `impl From<Vec<Span>> for MultiSpan`.

A simple `impl`.

r? @nrc
-rw-r--r--src/libsyntax_pos/lib.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsyntax_pos/lib.rs b/src/libsyntax_pos/lib.rs
index cba5c812b07..27fbca19dcc 100644
--- a/src/libsyntax_pos/lib.rs
+++ b/src/libsyntax_pos/lib.rs
@@ -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