Accessing Span internals is deprecated

This commit is contained in:
Oliver Schneider
2017-08-31 14:47:45 +02:00
parent 9d6c0feef2
commit a8cf4e8ecb
13 changed files with 42 additions and 88 deletions

View File

@@ -140,11 +140,11 @@ fn str_span(base: Span, s: &str, c: usize) -> Span {
match (si.next(), si.next()) {
(Some((l, _)), Some((h, _))) => {
Span {
lo: base.lo + BytePos(l as u32),
hi: base.lo + BytePos(h as u32),
..base
}
Span::new(
base.lo() + BytePos(l as u32),
base.lo() + BytePos(h as u32),
base.ctxt(),
)
},
_ => base,
}