mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-01 22:18:23 +03:00
+1
-1
@@ -1 +1 @@
|
||||
nightly-2018-11-20
|
||||
nightly-2018-11-21
|
||||
|
||||
+3
-4
@@ -469,10 +469,9 @@ fn emulate_foreign_item(
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user