Get rid of const eval_* and try_eval_* helpers
This commit is contained in:
parent
a2a1206811
commit
e83e4e8112
31 changed files with 119 additions and 172 deletions
|
@ -406,7 +406,7 @@ impl<'tcx> Context for TablesWrapper<'tcx> {
|
|||
let tcx = tables.tcx;
|
||||
let mir_const = cnst.internal(&mut *tables, tcx);
|
||||
mir_const
|
||||
.try_eval_target_usize(tables.tcx, ParamEnv::empty())
|
||||
.try_to_target_usize(tables.tcx)
|
||||
.ok_or_else(|| Error::new(format!("Const `{cnst:?}` cannot be encoded as u64")))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue