Skip to content

Commit a6401e7

Browse files
authored
Merge pull request #537 from solson/rustup
bump Rust
2 parents 669b9ea + 0b7625a commit a6401e7

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nightly-2018-11-20
1+
nightly-2018-11-21

src/fn_call.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -469,10 +469,9 @@ impl<'a, 'mir, 'tcx: 'mir + 'a> EvalContextExt<'tcx, 'mir> for super::MiriEvalCo
469469
instance,
470470
promoted: None,
471471
};
472-
let const_val = self.const_eval(cid)?;
473-
let value = const_val.unwrap_bits(
474-
self.tcx.tcx,
475-
ty::ParamEnv::empty().and(self.tcx.types.i32)) as i32;
472+
let const_val = self.const_eval_raw(cid)?;
473+
let const_val = self.read_scalar(const_val.into())?;
474+
let value = const_val.to_i32()?;
476475
if value == name {
477476
result = Some(path_value);
478477
break;

tests/compile-fail-fullmir/stacked_borrows/box_exclusive_violation1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ fn unknown_code_2() { unsafe {
2525
} }
2626

2727
fn main() {
28-
assert_eq!(demo_mut_advanced_unique(Box::new(0)), 5);
28+
demo_mut_advanced_unique(Box::new(0));
2929
}

tests/compile-fail-fullmir/stacked_borrows/mut_exclusive_violation1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ fn unknown_code_2() { unsafe {
2525
} }
2626

2727
fn main() {
28-
assert_eq!(demo_mut_advanced_unique(&mut 0), 5);
28+
demo_mut_advanced_unique(&mut 0);
2929
}

0 commit comments

Comments
 (0)