Auto merge of #48917 - petrochenkov:import, r=oli-obk

syntax: Make imports in AST closer to the source and cleanup their parsing

This is a continuation of https://github.com/rust-lang/rust/pull/45846 in some sense.
This commit is contained in:
bors
2018-03-18 01:50:52 +00:00
39 changed files with 228 additions and 260 deletions

View File

@@ -214,7 +214,7 @@ impl<'a> StringReader<'a> {
// Make the range zero-length if the span is invalid.
if span.lo() > span.hi() || begin.fm.start_pos != end.fm.start_pos {
span = span.with_hi(span.lo());
span = span.shrink_to_lo();
}
let mut sr = StringReader::new_raw_internal(sess, begin.fm);