1
Fork 0

Enable incremental-relative-spans by default.

This commit is contained in:
Camille GILLOT 2023-09-07 20:13:57 +00:00
parent 70c7e4d21c
commit 717dc1ce21
5 changed files with 3 additions and 12 deletions

View file

@ -770,7 +770,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_relative_spans() {
if self.tcx.sess.opts.incremental.is_some() {
span.with_parent(Some(self.current_hir_id_owner.def_id))
} else {
// Do not make spans relative when not using incremental compilation.