Skip to content

Commit 4901083

Browse files
committed
another trivial cleanup
fix a comment and move a variable where it's used
1 parent 16a5da7 commit 4901083

File tree

1 file changed

+2
-3
lines changed
  • compiler/rustc_borrowck/src

1 file changed

+2
-3
lines changed

compiler/rustc_borrowck/src/nll.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,10 @@ pub(crate) fn compute_regions<'cx, 'tcx>(
182182
borrow_set,
183183
);
184184

185-
let def_id = body.source.def_id();
186-
187-
// Dump facts if requested.
185+
// If requested: dump NLL facts, and run legacy polonius analysis.
188186
let polonius_output = all_facts.as_ref().and_then(|all_facts| {
189187
if infcx.tcx.sess.opts.unstable_opts.nll_facts {
188+
let def_id = body.source.def_id();
190189
let def_path = infcx.tcx.def_path(def_id);
191190
let dir_path = PathBuf::from(&infcx.tcx.sess.opts.unstable_opts.nll_facts_dir)
192191
.join(def_path.to_filename_friendly_no_crate());

0 commit comments

Comments
 (0)