Assert defining anchor is set in take_opaque_types
This commit is contained in:
parent
5132e13f13
commit
f769d34291
10 changed files with 13 additions and 19 deletions
|
@ -1338,6 +1338,12 @@ impl<'tcx> InferCtxt<'tcx> {
|
|||
var_infos
|
||||
}
|
||||
|
||||
#[instrument(level = "debug", skip(self), ret)]
|
||||
pub fn take_opaque_types(&self) -> opaque_types::OpaqueTypeMap<'tcx> {
|
||||
debug_assert_ne!(self.defining_use_anchor, DefiningAnchor::Error);
|
||||
std::mem::take(&mut self.inner.borrow_mut().opaque_type_storage.opaque_types)
|
||||
}
|
||||
|
||||
pub fn ty_to_string(&self, t: Ty<'tcx>) -> String {
|
||||
self.resolve_vars_if_possible(t).to_string()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue