about summary refs log tree commit diff
path: root/src/libsyntax_ext
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2019-05-27 13:52:11 +1000
committerNicholas Nethercote <nnethercote@mozilla.com>2019-05-29 09:32:56 +1000
commitcaea42f6c8ba8f5cc5ed04557ec5d072b107e7b4 (patch)
tree9ddcc6be16ffaabb4d5dfbd86340c043c2e08f3a /src/libsyntax_ext
parent828f6fdbe57a7b0e6b7bf7194ee9a2079b2779cd (diff)
downloadrust-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/proc_macro_server.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax_ext/proc_macro_server.rs b/src/libsyntax_ext/proc_macro_server.rs
index 53730d2d080..cc05ecf8df5 100644
--- a/src/libsyntax_ext/proc_macro_server.rs
+++ b/src/libsyntax_ext/proc_macro_server.rs
@@ -680,7 +680,7 @@ impl server::Span for Rustc<'_> {
         self.sess.source_map().lookup_char_pos(span.lo()).file
     }
     fn parent(&mut self, span: Self::Span) -> Option<Self::Span> {
-        span.ctxt().outer().expn_info().map(|i| i.call_site)
+        span.ctxt().outer_expn_info().map(|i| i.call_site)
     }
     fn source(&mut self, span: Self::Span) -> Self::Span {
         span.source_callsite()