diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-05-27 13:52:11 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-05-29 09:32:56 +1000 |
| commit | caea42f6c8ba8f5cc5ed04557ec5d072b107e7b4 (patch) | |
| tree | 9ddcc6be16ffaabb4d5dfbd86340c043c2e08f3a /src/libsyntax/ext | |
| parent | 828f6fdbe57a7b0e6b7bf7194ee9a2079b2779cd (diff) | |
| download | rust-caea42f6c8ba8f5cc5ed04557ec5d072b107e7b4.tar.gz rust-caea42f6c8ba8f5cc5ed04557ec5d072b107e7b4.zip | |
Introduce and use `SyntaxContext::outer_expn_info()`.
It reduces two `hygiene_data` accesses to one on some hot paths.
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/base.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs index d72193ffe12..4b5b9ff7bbe 100644 --- a/src/libsyntax/ext/base.rs +++ b/src/libsyntax/ext/base.rs @@ -872,7 +872,7 @@ impl<'a> ExtCtxt<'a> { let mut ctxt = self.backtrace(); let mut last_macro = None; loop { - if ctxt.outer().expn_info().map_or(None, |info| { + if ctxt.outer_expn_info().map_or(None, |info| { if info.format.name() == sym::include { // Stop going up the backtrace once include! is encountered return None; |
