DioxusLabs/dioxus · error · syn::Error
Use `this: &Self` instead of `self`
Error message
Use `this: &Self` instead of `self`
What it means
Error "Use `this: &Self` instead of `self`" thrown in DioxusLabs/dioxus.
Source
Thrown at packages/manganis/manganis-macro/src/ffi.rs:231
let arg_ty = ForeignType::from_type(&pat_type.ty)?;
// Check if first arg is `this: &SomeType`
if i == 0
&& arg_name == "this"
&& let ForeignType::OpaqueRef(type_name) = &arg_ty
{
receiver = Some(type_name.clone());
continue; // Don't add to args
}
args.push(ForeignArg {
name: arg_name,
ty: arg_ty,
});
}
syn::FnArg::Receiver(_) => {
return Err(syn::Error::new(
input.span(),
"Use `this: &Self` instead of `self`",
));
}
}
}
let return_type = match &func.sig.output {
ReturnType::Default => ForeignType::Unit,
ReturnType::Type(_, ty) => ForeignType::from_type(ty)?,
};
Ok(Self {
name,
receiver,
args,
return_type,
})View on GitHub (pinned to 393d190a80)
When it happens
Trigger: Thrown at packages/manganis/manganis-macro/src/ffi.rs:231 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of DioxusLabs/dioxus@393d190a80 (2026-08-16).
Data as JSON: /api/errors/a6470593f03c880b.
Report an issue: GitHub.