about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_const_eval/src/util')
-rw-r--r--compiler/rustc_const_eval/src/util/caller_location.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_const_eval/src/util/caller_location.rs b/compiler/rustc_const_eval/src/util/caller_location.rs
index 4a3cfd50b44..36a315b8f30 100644
--- a/compiler/rustc_const_eval/src/util/caller_location.rs
+++ b/compiler/rustc_const_eval/src/util/caller_location.rs
@@ -27,6 +27,7 @@ fn alloc_caller_location<'mir, 'tcx>(
         // See https://github.com/rust-lang/rust/pull/89920#discussion_r730012398
         ecx.allocate_str("<redacted>", MemoryKind::CallerLocation, Mutability::Not).unwrap()
     };
+    let file = file.map_provenance(CtfeProvenance::as_immutable);
     let line = if loc_details.line { Scalar::from_u32(line) } else { Scalar::from_u32(0) };
     let col = if loc_details.column { Scalar::from_u32(col) } else { Scalar::from_u32(0) };