improve NLL/polonius scope equality assertion

This commit is contained in:
Rémy Rakic 2023-11-23 09:47:07 +00:00
parent b442120a30
commit de2b8b13d4

View file

@ -432,7 +432,8 @@ pub fn new(
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;