Skip to content

Commit

Permalink
Fix nits
Browse files Browse the repository at this point in the history
Co-Authored-By: Ralf Jung <[email protected]>
  • Loading branch information
Aaron1011 and RalfJung authored Nov 20, 2019
1 parent 3102129 commit 2176bf6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub struct MiriConfig {
/// Returns a freshly created `InterpCx`, along with an `MPlaceTy` representing
/// the location where the return value of the `start` lang item will be
/// written to.
/// Used by `priroda` and `miri
/// Public because this is also used by `priroda`.
pub fn create_ecx<'mir, 'tcx: 'mir>(
tcx: TyCtxt<'tcx>,
main_id: DefId,
Expand Down Expand Up @@ -178,7 +178,7 @@ pub fn create_ecx<'mir, 'tcx: 'mir>(

/// Evaluates the main function specified by `main_id`.
/// Returns `Some(return_code)` if program executed completed.
/// Returns `None` if an evaluation error occured
/// Returns `None` if an evaluation error occured.
pub fn eval_main<'tcx>(tcx: TyCtxt<'tcx>, main_id: DefId, config: MiriConfig) -> Option<i64> {
let (mut ecx, ret_ptr) = match create_ecx(tcx, main_id, config) {
Ok(v) => v,
Expand Down Expand Up @@ -209,7 +209,7 @@ pub fn eval_main<'tcx>(tcx: TyCtxt<'tcx>, main_id: DefId, config: MiriConfig) ->
if !ignore_leaks && leaks != 0 {
tcx.sess.err("the evaluated program leaked memory");
// Ignore the provided return code - let the reported error
// determine the return code
// determine the return code.
return None;
}
return Some(return_code)
Expand Down Expand Up @@ -260,7 +260,7 @@ pub fn eval_main<'tcx>(tcx: TyCtxt<'tcx>, main_id: DefId, config: MiriConfig) ->
trace!(" local {}: {:?}", i, local.value);
}
}
// Let the reported error determine the return code
// Let the reported error determine the return code.
return None;
}
}
Expand Down

0 comments on commit 2176bf6

Please sign in to comment.