@@ -1326,13 +1326,13 @@ fn writeln_impl<W: std::io::Write>(w: &mut W, w_uses: &mut HashSet<String, NonRa
1326
1326
if let syn:: ReturnType :: Type ( _, rtype) = & $m. sig. output {
1327
1327
if let syn:: Type :: Reference ( r) = & * * rtype {
1328
1328
assert_eq!( $m. sig. inputs. len( ) , 1 ) ; // Must only take self
1329
- writeln!( w, "extern \" C\" fn {}_{}_set_{}(trait_self_arg: &{}) {{" , ident, $trait. ident, $m. sig. ident, $trait . ident ) . unwrap( ) ;
1329
+ writeln!( w, "extern \" C\" fn {}_{}_set_{}(trait_self_arg: &crate:: {}) {{" , ident, $trait. ident, $m. sig. ident, $trait_path ) . unwrap( ) ;
1330
1330
writeln!( w, "\t // This is a bit race-y in the general case, but for our specific use-cases today, we're safe" ) . unwrap( ) ;
1331
1331
writeln!( w, "\t // Specifically, we must ensure that the first time we're called it can never be in parallel" ) . unwrap( ) ;
1332
1332
write!( w, "\t if " ) . unwrap( ) ;
1333
1333
$types. write_empty_rust_val_check( Some ( & meth_gen_types) , w, & * r. elem, & format!( "unsafe {{ &*trait_self_arg.{}.get() }}" , $m. sig. ident) ) ;
1334
1334
writeln!( w, " {{" ) . unwrap( ) ;
1335
- writeln!( w, "\t \t *unsafe {{ &mut *(&*(trait_self_arg as *const {})).{}.get() }} = {}_{}_{}(trait_self_arg.this_arg).into();" , $trait . ident , $m. sig. ident, ident, $trait. ident, $m. sig. ident) . unwrap( ) ;
1335
+ writeln!( w, "\t \t *unsafe {{ &mut *(&*(trait_self_arg as *const crate:: {})).{}.get() }} = {}_{}_{}(trait_self_arg.this_arg).into();" , $trait_path , $m. sig. ident, ident, $trait. ident, $m. sig. ident) . unwrap( ) ;
1336
1336
writeln!( w, "\t }}" ) . unwrap( ) ;
1337
1337
writeln!( w, "}}" ) . unwrap( ) ;
1338
1338
}
0 commit comments