diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2022-12-09 16:36:28 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2022-12-25 18:48:36 +0000 |
| commit | 40c8165395cef78f5f8bfadd8802cbda41a4cb00 (patch) | |
| tree | be135ae7ea4f7d5a9ad3d532ffe48668449a14a7 /compiler/rustc_ast_lowering/src | |
| parent | 65f342daeaaab5b546e2e76d04140d1c788780b9 (diff) | |
| download | rust-40c8165395cef78f5f8bfadd8802cbda41a4cb00.tar.gz rust-40c8165395cef78f5f8bfadd8802cbda41a4cb00.zip | |
Only enable relative span hashing on nightly.
Diffstat (limited to 'compiler/rustc_ast_lowering/src')
| -rw-r--r-- | compiler/rustc_ast_lowering/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs index bff48a6d0a1..bb087326cb1 100644 --- a/compiler/rustc_ast_lowering/src/lib.rs +++ b/compiler/rustc_ast_lowering/src/lib.rs @@ -776,7 +776,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { /// Intercept all spans entering HIR. /// Mark a span as relative to the current owning item. fn lower_span(&self, span: Span) -> Span { - if self.tcx.sess.opts.incremental.is_some() { + if self.tcx.sess.opts.incremental_relative_spans() { span.with_parent(Some(self.current_hir_id_owner.def_id)) } else { // Do not make spans relative when not using incremental compilation. |
