ctfe, const_to_op
only for mir constants
This commit is contained in:
parent
638b612154
commit
526856768d
6 changed files with 40 additions and 49 deletions
|
@ -471,7 +471,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
|
|||
return None;
|
||||
}
|
||||
|
||||
self.ecx.mir_const_to_op(&c.literal, None).ok()
|
||||
self.ecx.const_to_op(&c.literal, None).ok()
|
||||
}
|
||||
|
||||
/// Returns the value, if any, of evaluating `place`.
|
||||
|
|
|
@ -292,7 +292,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
|
|||
return None;
|
||||
}
|
||||
|
||||
match self.ecx.mir_const_to_op(&c.literal, None) {
|
||||
match self.ecx.const_to_op(&c.literal, None) {
|
||||
Ok(op) => Some(op),
|
||||
Err(error) => {
|
||||
let tcx = self.ecx.tcx.at(c.span);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue