Fix some nits
This commit is contained in:
parent
a384f131cb
commit
e18c59fd48
@ -530,11 +530,10 @@ impl Session {
|
||||
Some(ref c) if c == crate_name => {
|
||||
let fuel = self.optimization_fuel_limit.get();
|
||||
ret = fuel != 0;
|
||||
if fuel == 0 && !self.out_of_fuel.get(){
|
||||
if fuel == 0 && !self.out_of_fuel.get() {
|
||||
println!("optimization-fuel-exhausted: {}", msg());
|
||||
self.out_of_fuel.set(true);
|
||||
}
|
||||
else if fuel > 0{
|
||||
} else if fuel > 0 {
|
||||
self.optimization_fuel_limit.set(fuel-1);
|
||||
}
|
||||
}
|
||||
|
@ -518,7 +518,9 @@ impl<'a> CompilerCalls<'a> for RustcDefaultCalls {
|
||||
}
|
||||
|
||||
if sess.print_fuel_crate.is_some() {
|
||||
control.compilation_done.callback = box |state| {
|
||||
let old_callback = control.compilation_done.callback;
|
||||
control.compilation_done.callback = box move |state| {
|
||||
old_callback(state);
|
||||
let sess = state.session;
|
||||
println!("Fuel used by {}: {}",
|
||||
sess.print_fuel_crate.as_ref().unwrap(),
|
||||
|
@ -622,8 +622,8 @@ pub fn trans_intrinsic_call<'a, 'tcx>(bcx: &Builder<'a, 'tcx>,
|
||||
let val = bcx.extract_value(val, i);
|
||||
let lval = LvalueRef::new_sized_ty(llresult, ret_ty,
|
||||
Alignment::AbiAligned);
|
||||
let (dest, _) = lval.trans_field_ptr(bcx, i);
|
||||
bcx.store(val, dest, None);
|
||||
let (dest, align) = lval.trans_field_ptr(bcx, i);
|
||||
bcx.store(val, dest, align.to_align());
|
||||
}
|
||||
C_nil(ccx)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user