commit | 6db0f2af03b7477be2f9488ce880c8b477f6f185 | [log] [tgz] |
---|---|---|
author | David Tolnay <dtolnay@gmail.com> | Sun Jun 23 13:37:39 2019 -0700 |
committer | David Tolnay <dtolnay@gmail.com> | Sun Jun 23 13:37:39 2019 -0700 |
tree | eb6ccaaf232c217ca80407fec33fa80d34dcc471 | |
parent | 3f1e35f3a61d69fac8fdfe7ed9bd4d3d8d1e52b8 [diff] [blame] |
Use cursor scope ptr to determine cursor provenance
diff --git a/src/buffer.rs b/src/buffer.rs index 8c32645..a13d683 100644 --- a/src/buffer.rs +++ b/src/buffer.rs
@@ -348,6 +348,10 @@ } impl private { + pub fn same_scope(a: Cursor, b: Cursor) -> bool { + a.scope == b.scope + } + #[cfg(procmacro2_semver_exempt)] pub fn open_span_of_group(cursor: Cursor) -> Span { match *cursor.entry() {