rust/src/rustdoc
Kevin Atkinson ad21d9c64a Don't reset the chpos/byte_pos to 0 in new_parser_from_source_str.
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).
2012-01-23 17:37:15 -08:00
..
astsrv.rs rustdoc: Prune unconfigured items from AST 2012-01-18 15:48:09 -08:00
attr_parser.rs Don't reset the chpos/byte_pos to 0 in new_parser_from_source_str. 2012-01-23 17:37:15 -08:00
attr_pass.rs Revert "rustdoc: Get the crate brief description from the 'desc' attr" 2012-01-23 16:23:08 -08:00
doc.rs rustdoc: Make doc::retdoc non-optional 2012-01-19 19:14:29 -08:00
extract.rs rustdoc: Make doc::retdoc non-optional 2012-01-19 19:14:29 -08:00
fold.rs misc: "tag" -> "enum" for cargo, compiletest, fuzzer, rustdoc 2012-01-19 16:21:33 -08:00
gen.rs rustdoc: Print return value descriptions on same line as type 2012-01-23 16:18:01 -08:00
parse.rs Don't reset the chpos/byte_pos to 0 in new_parser_from_source_str. 2012-01-23 17:37:15 -08:00
path_pass.rs rustdoc: Add path_pass for recording full paths to mods 2012-01-19 00:04:59 -08:00
prune_undoc_pass.rs rustdoc: Prune undocumented return values 2012-01-23 16:18:01 -08:00
rustdoc.rc Change rustc and rustdoc's #[desc] attribute to #[comment] 2012-01-23 16:25:20 -08:00
rustdoc.rs rustdoc: Run tystr pass before attr pass 2012-01-19 14:35:18 -08:00
tystr_pass.rs rustdoc: Make doc::retdoc non-optional 2012-01-19 19:14:29 -08:00