[mozilla/rust] 1625a4: Revert "rustc: Exclude stdin from codemap files wh...

rust-commits at mozilla.org rust-commits at mozilla.org
Mon Jan 23 17:37:25 PST 2012


  Branch: refs/heads/master
  Home:   https://github.com/mozilla/rust
  Commit: 1625a4320d80d65814dbbef2a593ba340163bc9c
      https://github.com/mozilla/rust/commit/1625a4320d80d65814dbbef2a593ba340163bc9c
  Author: Kevin Atkinson <kevina at cs.utah.edu>
  Date:   2012-01-23 (Mon, 23 Jan 2012)

  Changed paths:
    M src/comp/syntax/codemap.rs

  Log Message:
  -----------
  Revert "rustc: Exclude stdin from codemap files when lookup_pos".

Need a better fix, right now it is just causing even more confusion,
for example in issue #1448 and #1387.

This reverts commit 1e4de333740690357a8f58883c5c69bf58be1424.


  Commit: 355edf13e7d41ecdef750b166824422e76c4ef26
      https://github.com/mozilla/rust/commit/355edf13e7d41ecdef750b166824422e76c4ef26
  Author: Kevin Atkinson <kevina at cs.utah.edu>
  Date:   2012-01-23 (Mon, 23 Jan 2012)

  Changed paths:
    M src/comp/syntax/ext/expand.rs

  Log Message:
  -----------
  Change "file" of injected string from "-" to "<anon>", less confusing
that way.


  Commit: ad21d9c64a1b7b6fb996f37d697c5d4f43f13bae
      https://github.com/mozilla/rust/commit/ad21d9c64a1b7b6fb996f37d697c5d4f43f13bae
  Author: Kevin Atkinson <kevina at cs.utah.edu>
  Date:   2012-01-23 (Mon, 23 Jan 2012)

  Changed paths:
    M src/cargo/cargo.rs
  M src/comp/driver/driver.rs
  M src/comp/syntax/parse/eval.rs
  M src/comp/syntax/parse/parser.rs
  M src/fuzzer/fuzzer.rs
  M src/rustdoc/attr_parser.rs
  M src/rustdoc/parse.rs

  Log Message:
  -----------
  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).


  Commit: 20ab47fe499b255498268198279fc3df11a29f3f
      https://github.com/mozilla/rust/commit/20ab47fe499b255498268198279fc3df11a29f3f
  Author: Kevin Atkinson <kevina at cs.utah.edu>
  Date:   2012-01-23 (Mon, 23 Jan 2012)

  Changed paths:
    M src/comp/front/config.rs
  M src/comp/front/test.rs
  M src/comp/syntax/ext/expand.rs
  M src/comp/syntax/ext/simplext.rs
  M src/comp/syntax/fold.rs
  M src/fuzzer/fuzzer.rs

  Log Message:
  -----------
  Allow ast_fold_precursor to change the span.

This involved changing the prototype for the callbacks to thread the
span though.  A wrapper function, fold::wrap, can be used to wrap the
old style callbacks.


  Commit: 4795e19d6d997143a855b8ac6b5cb288e8caea35
      https://github.com/mozilla/rust/commit/4795e19d6d997143a855b8ac6b5cb288e8caea35
  Author: Kevin Atkinson <kevina at cs.utah.edu>
  Date:   2012-01-23 (Mon, 23 Jan 2012)

  Changed paths:
    M src/comp/syntax/ext/simplext.rs

  Log Message:
  -----------
  When replacing a pattern variable in macro expansion use the span of
the replacement and not the span of the pattern variable.

Fixes issue #1448, and #1387.


  Commit: 5e60facf781efa666bc93a4493d659112c01f2b1
      https://github.com/mozilla/rust/commit/5e60facf781efa666bc93a4493d659112c01f2b1
  Author: Kevin Atkinson <kevina at cs.utah.edu>
  Date:   2012-01-23 (Mon, 23 Jan 2012)

  Changed paths:
    A src/test/compile-fail/issue-1448-1.rs
  A src/test/compile-fail/issue-1448-2.rs

  Log Message:
  -----------
  Add regresion tests for issue #1448 and #1387.


  Commit: 664d9cc86fe4e2eb24e85677c27b576fbcfc316b
      https://github.com/mozilla/rust/commit/664d9cc86fe4e2eb24e85677c27b576fbcfc316b
  Author: Kevin Atkinson <kevina at cs.utah.edu>
  Date:   2012-01-23 (Mon, 23 Jan 2012)

  Changed paths:
    A src/test/compile-fail/issue-1362.rs

  Log Message:
  -----------
  Add regression test for issue #1362.

Although its not really needed.  Without that fix, reported spans will
likely be bogus if the error is within the first couple of lines
(probable around 5) of that file.  Thus, many of the compile-fail
tests will fail due to incorrect location.


  Commit: 7d5d1a311eb8cbb6a8e9ea44528b406e9cf822d0
      https://github.com/mozilla/rust/commit/7d5d1a311eb8cbb6a8e9ea44528b406e9cf822d0
  Author: Brian Anderson <banderson at mozilla.com>
  Date:   2012-01-23 (Mon, 23 Jan 2012)

  Changed paths:
    M src/test/compile-fail/issue-1362.rs

  Log Message:
  -----------
  test: Add no-reformat directive to compile-fail/issue-1362


Compare: https://github.com/mozilla/rust/compare/93e9600...7d5d1a3


More information about the Rust-commits mailing list