mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
Eagerly check for accidentally registered region constraints instead of waiting until borrowck is done
This commit is contained in:
parent
19bd91d128
commit
b2b5fa825d
@ -39,6 +39,12 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
|
||||
|
||||
let TypeOpOutput { output, constraints, error_info } =
|
||||
op.fully_perform(self.infcx, locations.span(self.body))?;
|
||||
if cfg!(debug_assertions) {
|
||||
let data = self.infcx.take_and_reset_region_constraints();
|
||||
if !data.is_empty() {
|
||||
panic!("leftover region constraints: {data:#?}");
|
||||
}
|
||||
}
|
||||
|
||||
debug!(?output, ?constraints);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user