ad21d9c64a
This correctly fixes issue #1362. chpos/byte_pos are now the offsets within a particular file, but rather the offsets within a virtual file with is formed by combing all of the modules within a crate. Thus, resetting them to 0 causes an overlap and hence, bogus source locations. Fix #1362 by moving chpos/byte_pos to parse_sess so that new_parser_from_source_str has access to them and hence can chose an initial value that is not already been used in the crate. Note that the trigger for bug 1361 was that syntax/ext/expand.rs calls parse_expr_from_source_str (which calls new_parser_from_source_str) using the same codemap as the current crate (and hence causing overlap with files in the crate as new_parser_from_source_str resets the chpos/byte_pos to 0). |
||
---|---|---|
.. | ||
astsrv.rs | ||
attr_parser.rs | ||
attr_pass.rs | ||
doc.rs | ||
extract.rs | ||
fold.rs | ||
gen.rs | ||
parse.rs | ||
path_pass.rs | ||
prune_undoc_pass.rs | ||
rustdoc.rc | ||
rustdoc.rs | ||
tystr_pass.rs |