]> git.lizzy.rs Git - rust.git/blobdiff - src/libsyntax/test_snippet.rs
Make fields of `Span` private
[rust.git] / src / libsyntax / test_snippet.rs
index 4fae2ff9814fda9b00d6647b66d705a294628a78..e9b1976ea472b734ce83bd516e3bb2a1ded3f4cd 100644 (file)
@@ -80,11 +80,7 @@ fn make_span(file_text: &str, start: &Position, end: &Position) -> Span {
     let start = make_pos(file_text, start);
     let end = make_pos(file_text, end) + end.string.len(); // just after matching thing ends
     assert!(start <= end);
-    Span {
-        lo: BytePos(start as u32),
-        hi: BytePos(end as u32),
-        ctxt: NO_EXPANSION,
-    }
+    Span::new(BytePos(start as u32), BytePos(end as u32), NO_EXPANSION)
 }
 
 fn make_pos(file_text: &str, pos: &Position) -> usize {