]> git.lizzy.rs Git - rust.git/commit
Introduce InnerSpan abstraction
authorMark Rousskov <mark.simulacrum@gmail.com>
Tue, 4 Jun 2019 15:03:43 +0000 (09:03 -0600)
committerMark Rousskov <mark.simulacrum@gmail.com>
Sun, 9 Jun 2019 20:09:36 +0000 (14:09 -0600)
commitb1c357e0c366f5fb865151a9dd144413b4bf6911
tree9c0c883525300d8ad063b6b3eba2f07f7740c7d5
parenta8594400927c7363d24625ea1521b89c344ec03d
Introduce InnerSpan abstraction

This should be used when trying to get at subsets of a larger span,
especially when the larger span is not available in the code attempting
to work with those subsets (especially common in the fmt_macros crate).

This is usually a good replacement for (BytePos, BytePos) and (usize,
usize) tuples.

This commit also removes from_inner_byte_pos, since it took usize
arguments, which is error prone.
src/libfmt_macros/lib.rs
src/librustdoc/passes/check_code_block_syntax.rs
src/librustdoc/passes/mod.rs
src/libsyntax_ext/format.rs
src/libsyntax_ext/format_foreign.rs
src/libsyntax_pos/lib.rs