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
Part of the problem is the way we determine is_mut_ref_param in mk_vir_args (fn_call_to_vir.rs):
let raw_inputs = bctx.ctxt.tcx.fn_sig(f).instantiate(tcx, node_substs).skip_binder().inputs();
assert!(raw_inputs.len() == args.len());
args.iter()
.zip(raw_inputs)
.map(|(arg, raw_param)| {
let is_mut_ref_param = match raw_param.kind() {
TyKind::Ref(_, _, rustc_hir::Mutability::Mut) => true,
_ => false,
};
...
So we have spec_eq which has type for<Lhs, Rhs> (Lhs, Rhs) -> bool. After instantiating that with the type params with Lhs and Rhs it becomes (&mut X, &mut X) -> bool and these are then interpreted as mutable params.
I think maybe we shouldn't be calling mk_vir_args at all for spec_eq ... I'm not sure if this is a problem more generally. Might be worth skipping this issue until next-gen mut-ref support anyway.
The text was updated successfully, but these errors were encountered: