+ opaque_arg_conv = opaque_arg_conv + "\n// Warning: we need a move here but no clone is available for " + ty_info.rust_obj
+ # TODO: Once we support features cloning (which just isn't in C yet), we can make this a compile error instead!
+ from_hu_conv = (from_hu_conv[0], from_hu_conv[1] + ";\n" +
+ "// Due to rust's strict-ownership memory model, in some cases we need to \"move\"\n" +
+ "// an object to pass exclusive ownership to the function being called.\n" +
+ "// In most cases, we avoid this being visible in GC'd languages by cloning the object\n" +
+ "// at the FFI layer, creating a new object which Rust can claim ownership of\n" +
+ "// However, in some cases (eg here), there is no way to clone an object, and thus\n" +
+ "// we actually have to pass full ownership to Rust.\n" +
+ "// Thus, after this call, " + ty_info.var_name + " is reset to null and is now a dummy object.\n" + ty_info.var_name + ".ptr = 0")