]> git.lizzy.rs Git - rust.git/commit
utils: Add CodeMapSpanUtils trait for span_* methods
authorKamal Marhubi <kamal@marhubi.com>
Mon, 7 Mar 2016 18:41:32 +0000 (13:41 -0500)
committerKamal Marhubi <kamal@marhubi.com>
Sun, 13 Mar 2016 22:14:07 +0000 (18:14 -0400)
commitd82d9fc808bfa3f99844ed40f622c8a53e2d267e
tree7ab35a3dce6c6039d64d7bb2fc5043ea2d21c379
parent80db099558e1a15352b7e7911aa3e3d002baa210
utils: Add CodeMapSpanUtils trait for span_* methods

This commit adds a CodeMapSpanUtils extension trait on CodeMap, and
moves some functions to methods there:
  - span_after
  - span_after_last
  - span_before

This better reflects them being lookup methods on the codemap.
src/expr.rs
src/imports.rs
src/items.rs
src/macros.rs
src/patterns.rs
src/types.rs
src/utils.rs
src/visitor.rs