Skip to content

Commit

Permalink
improve NLL/polonius scope equality assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
lqd committed Nov 27, 2023
1 parent 3a5ef00 commit 1666165
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/rustc_borrowck/src/dataflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,8 @@ impl<'mir, 'tcx> Borrows<'mir, 'tcx> {

assert_eq!(
borrows_out_of_scope_at_location, polonius_prec.loans_out_of_scope_at_location,
"the loans out of scope must be the same as the borrows out of scope"
"polonius loan scopes differ from NLL borrow scopes, for body {:?}",
body.span,
);

borrows_out_of_scope_at_location = polonius_prec.loans_out_of_scope_at_location;
Expand Down

0 comments on commit 1666165

Please sign in to comment.