commit
a6401e7d1d
4 changed files with 6 additions and 7 deletions
|
|
@ -1 +1 @@
|
|||
nightly-2018-11-20
|
||||
nightly-2018-11-21
|
||||
|
|
|
|||
|
|
@ -469,10 +469,9 @@ impl<'a, 'mir, 'tcx: 'mir + 'a> EvalContextExt<'tcx, 'mir> for super::MiriEvalCo
|
|||
instance,
|
||||
promoted: None,
|
||||
};
|
||||
let const_val = self.const_eval(cid)?;
|
||||
let value = const_val.unwrap_bits(
|
||||
self.tcx.tcx,
|
||||
ty::ParamEnv::empty().and(self.tcx.types.i32)) as i32;
|
||||
let const_val = self.const_eval_raw(cid)?;
|
||||
let const_val = self.read_scalar(const_val.into())?;
|
||||
let value = const_val.to_i32()?;
|
||||
if value == name {
|
||||
result = Some(path_value);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -25,5 +25,5 @@ fn unknown_code_2() { unsafe {
|
|||
} }
|
||||
|
||||
fn main() {
|
||||
assert_eq!(demo_mut_advanced_unique(Box::new(0)), 5);
|
||||
demo_mut_advanced_unique(Box::new(0));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,5 +25,5 @@ fn unknown_code_2() { unsafe {
|
|||
} }
|
||||
|
||||
fn main() {
|
||||
assert_eq!(demo_mut_advanced_unique(&mut 0), 5);
|
||||
demo_mut_advanced_unique(&mut 0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue