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
When an opaque type contains something that is rejected by hax, we produce an error but we could very well keep it as we are supposed to ignore what is inside anyway.
(* item error backend: (reject_RawOrMutPointer) ExplicitRejection { reason: "a node of kind [Raw_pointer] have been found in the AST" }
Last available AST for this item:
#[_hax::json("\"OpaqueType\"")]
#[feature(register_tool)]
#[register_tool(_hax)]
struct t_Pimpl<T>
where
_: core::marker::t_Sized<T>,
{
f_p: arrow!(raw_pointer!() -> tuple0),
}
Last AST:
/** print_rust: pitem: not implemented (item: { Concrete_ident.T.def_id =
{ Concrete_ident.Imported.krate = "opaque_type";
path =
[{ Concrete_ident.Imported.data =
(Concrete_ident.Imported.TypeNs "Pimpl"); disambiguator = 0 }
]
};
kind = Concrete_ident.Kind.Value }) */
const _: () = ();
*)
and could produce instead:
val t_Pimpl (#v_T: Type0) : Type0
Here is a possible design:
When importing THIR to the hax AST, if a type is opaque, replace its list of variants by a single variant (with a dummy name) containing a hax_lib type (that we would be adding). This should be removed anyway by the backend but should make debugging easier in case we see it somewhere.
The text was updated successfully, but these errors were encountered:
When an opaque type contains something that is rejected by hax, we produce an error but we could very well keep it as we are supposed to ignore what is inside anyway.
Example:
produces:
and could produce instead:
Here is a possible design:
When importing THIR to the hax AST, if a type is opaque, replace its list of variants by a single variant (with a dummy name) containing a
hax_lib
type (that we would be adding). This should be removed anyway by the backend but should make debugging easier in case we see it somewhere.The text was updated successfully, but these errors were encountered: