Skip to content

Commit

Permalink
Update crates/flux-fhir-analysis/src/conv/mod.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Nico Lehmann <nico.lehmannm@gmail.com>
  • Loading branch information
ranjitjhala and nilehmann authored Dec 16, 2024
1 parent c844c03 commit c982742
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions crates/flux-fhir-analysis/src/conv/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,27 +388,6 @@ pub(crate) fn conv_constant_expr(
let mut cx = AfterSortck::new(genv, wfckresults).into_conv_ctxt();
let mut env = Env::new(&[]);
Ok(rty::ConstantInfo::Interpreted(cx.conv_expr(&mut env, expr)?, sort))
// let ty = genv.tcx().type_of(def_id).no_bound_vars().unwrap();
// match expr {
// Some(expr) => Ok(rty::ConstantInfo::Interpreted(cx.conv_expr(&mut env, expr)?, sort)),
// None => {
// if ty.is_integral() {
// let val = genv.tcx().const_eval_poly(def_id).ok().and_then(|val| {
// let val = val.try_to_scalar_int()?;
// rty::Constant::from_scalar_int(genv.tcx(), val, &ty)
// });
// if let Some(constant_) = val {
// return Ok(rty::ConstantInfo::Interpreted(
// rty::Expr::constant(constant_),
// rty::Sort::Int,
// ));
// }
// // FIXME(nilehmann) we should probably report an error in case const evaluation
// // fails instead of silently ignore it.
// }
// Ok(rty::ConstantInfo::Uninterpreted)
// }
// }
}

pub(crate) fn conv_defn(
Expand Down

0 comments on commit c982742

Please sign in to comment.