const-eval interner: from-scratch rewrite using mutability information from provenance rather than types

This commit is contained in:
Ralf Jung
2023-12-16 16:24:25 +01:00
parent a58ec8ff03
commit 2f1a8e2d7a
52 changed files with 1093 additions and 688 deletions

View File

@@ -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) };