Skip to content

Commit

Permalink
propogate sort def not found error
Browse files Browse the repository at this point in the history
  • Loading branch information
vrindisbacher committed Nov 25, 2024
1 parent e412538 commit ab1148e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/flux-fhir-analysis/src/wf/sortck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,10 @@ impl<'genv, 'tcx> InferCtxt<'genv, 'tcx> {
ExprRes::Struct(def_id) | ExprRes::Enum(def_id) => def_id,
_ => span_bug!(expr.span, "unexpected path in constructor"),
};
let sort_def = match self.genv.adt_sort_def_of(path_def_id) {
Ok(sd) => sd,
Err(_) => span_bug!(path.span, "Unexpected path in constructor"),
};
let sort_def = self
.genv
.adt_sort_def_of(path_def_id)
.map_err(|e| self.emit_err(e))?;
// generate fresh inferred sorts for each param
let fresh_args = (0..sort_def.param_count())
.map(|_| self.next_sort_var())
Expand Down

0 comments on commit ab1148e

Please sign in to comment.