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/librustc_codegen_ssa | |
| 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/librustc_codegen_ssa')
| -rw-r--r-- | src/librustc_codegen_ssa/mir/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_codegen_ssa/mir/mod.rs b/src/librustc_codegen_ssa/mir/mod.rs index fed12c9a29f..8f4f0b5b23f 100644 --- a/src/librustc_codegen_ssa/mir/mod.rs +++ b/src/librustc_codegen_ssa/mir/mod.rs @@ -131,7 +131,7 @@ impl<'a, 'tcx: 'a, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { // at the level above that. let mut span = source_info.span; while span.ctxt() != NO_EXPANSION && span.ctxt() != self.mir.span.ctxt() { - if let Some(info) = span.ctxt().outer().expn_info() { + if let Some(info) = span.ctxt().outer_expn_info() { span = info.call_site; } else { break; |
