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

rust-commits at mozilla.org rust-commits at mozilla.org
Mon Jan 23 16:39:47 PST 2012


  Branch: refs/heads/try
  Home:   https://github.com/mozilla/rust
  Commit: 38a985ddf1ffab8a26bbbdebc182cd4697fe639a
      https://github.com/mozilla/rust/commit/38a985ddf1ffab8a26bbbdebc182cd4697fe639a
  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: a3446669244150ba5a30826b15f6f7ed74026136
      https://github.com/mozilla/rust/commit/a3446669244150ba5a30826b15f6f7ed74026136
  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: eee2b68840c8f6569aa549a67cbbc6777aa2aa69
      https://github.com/mozilla/rust/commit/eee2b68840c8f6569aa549a67cbbc6777aa2aa69
  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: 0754fa320a42604ce15c38dac37c8b16f07bbb72
      https://github.com/mozilla/rust/commit/0754fa320a42604ce15c38dac37c8b16f07bbb72
  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: b49d173a23e459e5cf3f31690e15174890cbf3f3
      https://github.com/mozilla/rust/commit/b49d173a23e459e5cf3f31690e15174890cbf3f3
  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: 19d5ad7ef1b5c85d72aac56121a2055a631f3641
      https://github.com/mozilla/rust/commit/19d5ad7ef1b5c85d72aac56121a2055a631f3641
  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: 1032063d8edbec5dec4f4ba9bb28e308ccbc49c1
      https://github.com/mozilla/rust/commit/1032063d8edbec5dec4f4ba9bb28e308ccbc49c1
  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: 63057424a331a0b61eb6c8b63128f73829ddc909
      https://github.com/mozilla/rust/commit/63057424a331a0b61eb6c8b63128f73829ddc909
  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/d9edcf5...6305742


More information about the Rust-commits mailing list