We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7abc1b commit 8d2b598Copy full SHA for 8d2b598
compiler/rustc_infer/src/infer/opaque_types/table.rs
@@ -1,6 +1,7 @@
1
use rustc_data_structures::fx::FxHashMap;
2
use rustc_data_structures::undo_log::UndoLogs;
3
-use rustc_middle::ty::{OpaqueTypeKey, Ty};
+use rustc_middle::ty::{self, OpaqueTypeKey, Ty};
4
+use rustc_span::DUMMY_SP;
5
6
use crate::infer::InferCtxtUndoLogs;
7
@@ -59,7 +60,11 @@ impl<'tcx> OpaqueTypeStorage<'tcx> {
59
60
61
impl<'tcx> Drop for OpaqueTypeStorage<'tcx> {
62
fn drop(&mut self) {
- assert!(self.opaque_types.is_empty(), "{:?}", self.opaque_types);
63
+ if !self.opaque_types.is_empty() {
64
+ ty::tls::with(|tcx| {
65
+ tcx.sess.delay_span_bug(DUMMY_SP, &format!("{:?}", self.opaque_types))
66
+ });
67
+ }
68
}
69
70
0 commit comments