no-bound derives: Use absolute path for core (#1763)

Closes: https://github.com/paritytech/polkadot-sdk/issues/1718
This commit is contained in:
Bastian Köcher
2023-10-01 21:45:32 +02:00
committed by GitHub
parent 2ed66a0960
commit c54ea64af4
6 changed files with 31 additions and 17 deletions
@@ -442,8 +442,8 @@ pub fn derive_runtime_debug_no_bound(input: TokenStream) -> TokenStream {
quote::quote!(
const _: () = {
impl #impl_generics core::fmt::Debug for #name #ty_generics #where_clause {
fn fmt(&self, fmt: &mut core::fmt::Formatter) -> core::fmt::Result {
impl #impl_generics ::core::fmt::Debug for #name #ty_generics #where_clause {
fn fmt(&self, fmt: &mut ::core::fmt::Formatter) -> core::fmt::Result {
fmt.write_str("<wasm:stripped>")
}
}
@@ -473,7 +473,7 @@ pub fn derive_eq_no_bound(input: TokenStream) -> TokenStream {
quote::quote_spanned!(name.span() =>
const _: () = {
impl #impl_generics core::cmp::Eq for #name #ty_generics #where_clause {}
impl #impl_generics ::core::cmp::Eq for #name #ty_generics #where_clause {}
};
)
.into()