Skip to content

Commit

Permalink
another trivial cleanup
Browse files Browse the repository at this point in the history
fix a comment and move a variable where it's used
  • Loading branch information
lqd committed Nov 26, 2023
1 parent 16a5da7 commit 4901083
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions compiler/rustc_borrowck/src/nll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,10 @@ pub(crate) fn compute_regions<'cx, 'tcx>(
borrow_set,
);

let def_id = body.source.def_id();

// Dump facts if requested.
// If requested: dump NLL facts, and run legacy polonius analysis.
let polonius_output = all_facts.as_ref().and_then(|all_facts| {
if infcx.tcx.sess.opts.unstable_opts.nll_facts {
let def_id = body.source.def_id();
let def_path = infcx.tcx.def_path(def_id);
let dir_path = PathBuf::from(&infcx.tcx.sess.opts.unstable_opts.nll_facts_dir)
.join(def_path.to_filename_friendly_no_crate());
Expand Down

0 comments on commit 4901083

Please sign in to comment.