diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-08-28 04:07:31 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-09-08 14:15:11 +0300 |
| commit | 27235698f5c73b12539e4765e8dccfec8e27c533 (patch) | |
| tree | 89ef57bf132b6d623ae59f4628635448d0e2f001 /src/libsyntax_pos | |
| parent | 9a539ade9fa450bc5653309499a87e71a2fe9286 (diff) | |
| download | rust-27235698f5c73b12539e4765e8dccfec8e27c533.tar.gz rust-27235698f5c73b12539e4765e8dccfec8e27c533.zip | |
resolve: Introduce "may appear after" abstraction for macro path resolutions
Diffstat (limited to 'src/libsyntax_pos')
| -rw-r--r-- | src/libsyntax_pos/hygiene.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libsyntax_pos/hygiene.rs b/src/libsyntax_pos/hygiene.rs index 7e985cf52f5..f053cb10d06 100644 --- a/src/libsyntax_pos/hygiene.rs +++ b/src/libsyntax_pos/hygiene.rs @@ -101,6 +101,11 @@ impl Mark { } #[inline] + pub fn parent(self) -> Mark { + HygieneData::with(|data| data.marks[self.0 as usize].parent) + } + + #[inline] pub fn expn_info(self) -> Option<ExpnInfo> { HygieneData::with(|data| data.marks[self.0 as usize].expn_info.clone()) } |
