1
Fork 0

validation: descend from consts into statics

This commit is contained in:
Ralf Jung 2024-01-06 13:48:48 +01:00
parent 4e77e368eb
commit 9c0623fe8f
25 changed files with 334 additions and 212 deletions

View file

@ -3,8 +3,9 @@
use std::fmt::Debug;
use rustc_const_eval::interpret::{ImmTy, Projectable};
use rustc_const_eval::interpret::{InterpCx, InterpResult, Scalar};
use rustc_const_eval::interpret::{
format_interp_error, ImmTy, InterpCx, InterpResult, Projectable, Scalar,
};
use rustc_data_structures::fx::FxHashSet;
use rustc_hir::def::DefKind;
use rustc_hir::HirId;
@ -246,7 +247,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
assert!(
!error.kind().formatted_string(),
"const-prop encountered formatting error: {}",
self.ecx.format_error(error),
format_interp_error(self.ecx.tcx.dcx(), error),
);
None
}