about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/util
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2023-12-16 16:24:25 +0100
committerRalf Jung <post@ralfj.de>2024-01-22 09:28:00 +0100
commit2f1a8e2d7a641a398e9e02c8c99e80f6e44dce87 (patch)
treee8e044a80ab5b723153703589e31aa24308e2a6e /compiler/rustc_const_eval/src/util
parenta58ec8ff03b3269b20104eb7eae407be48ab95a7 (diff)
downloadrust-2f1a8e2d7a641a398e9e02c8c99e80f6e44dce87.tar.gz
rust-2f1a8e2d7a641a398e9e02c8c99e80f6e44dce87.zip
const-eval interner: from-scratch rewrite using mutability information from provenance rather than types
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) };