validation: descend from consts into statics
This commit is contained in:
parent
4e77e368eb
commit
9c0623fe8f
25 changed files with 334 additions and 212 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue