You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tracing::debug!("⏳ Type-checking THIR body for {:#?}", ldid);
130
-
let span = hir.span(hir.local_def_id_to_hir_id(ldid));
133
+
let span = hir.span(tcx.local_def_id_to_hir_id(ldid));
131
134
let(thir, expr) = match tcx.thir_body(ldid){
132
135
Ok(x) => x,
133
136
Err(e) => {
134
-
tcx.sess.span_err(
137
+
let guar = tcx.dcx().span_err(
135
138
span,
136
139
"While trying to reach a body's THIR defintion, got a typechecking error.",
137
140
);
138
-
return(ldid,dummy_thir_body(tcx, span));
141
+
return(ldid,dummy_thir_body(tcx, span, guar));
139
142
}
140
143
};
141
144
let thir = match std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| {
142
145
thir.borrow().clone()
143
146
})){
144
147
Ok(x) => x,
145
148
Err(e) => {
146
-
tcx.sess.span_err(span,format!("The THIR body of item {:?} was stolen.\nThis is not supposed to happen.\nThis is a bug in Hax's frontend.\nThis is discussed in issue https://github.com/hacspec/hax/issues/27.\nPlease comment this issue if you see this error message!", ldid));
147
-
return(ldid,dummy_thir_body(tcx, span));
149
+
let guar = tcx.dcx().span_err(span,format!("The THIR body of item {:?} was stolen.\nThis is not supposed to happen.\nThis is a bug in Hax's frontend.\nThis is discussed in issue https://github.com/hacspec/hax/issues/27.\nPlease comment this issue if you see this error message!", ldid));
150
+
return(ldid,dummy_thir_body(tcx, span, guar));
148
151
}
149
152
};
150
153
tracing::debug!("✅ Type-checked THIR body for {:#?}", ldid);
@@ -298,7 +301,7 @@ impl Callbacks for ExtractionCallbacks {
0 commit comments