Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 003ec2a

Browse files
author
Joe C
authored
program error: use unambigious globs (#6590)
1 parent e00605d commit 003ec2a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

libraries/program-error/derive/src/macro_impl.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ impl MacroType {
5050
/// implements `From<Self> for solana_program::program_error::ProgramError`
5151
pub fn into_program_error(ident: &Ident) -> proc_macro2::TokenStream {
5252
quote! {
53-
impl From<#ident> for solana_program::program_error::ProgramError {
53+
impl From<#ident> for ::solana_program::program_error::ProgramError {
5454
fn from(e: #ident) -> Self {
55-
solana_program::program_error::ProgramError::Custom(e as u32)
55+
::solana_program::program_error::ProgramError::Custom(e as u32)
5656
}
5757
}
5858
}
@@ -61,7 +61,7 @@ pub fn into_program_error(ident: &Ident) -> proc_macro2::TokenStream {
6161
/// Builds the implementation of `solana_program::decode_error::DecodeError<T>`
6262
pub fn decode_error(ident: &Ident) -> proc_macro2::TokenStream {
6363
quote! {
64-
impl<T> solana_program::decode_error::DecodeError<T> for #ident {
64+
impl<T> ::solana_program::decode_error::DecodeError<T> for #ident {
6565
fn type_of() -> &'static str {
6666
stringify!(#ident)
6767
}
@@ -81,18 +81,18 @@ pub fn print_program_error(
8181
.unwrap_or_else(|| String::from("Unknown custom program error"));
8282
quote! {
8383
#ident::#variant_ident => {
84-
solana_program::msg!(#error_msg)
84+
::solana_program::msg!(#error_msg)
8585
}
8686
}
8787
});
8888
quote! {
89-
impl solana_program::program_error::PrintProgramError for #ident {
89+
impl ::solana_program::program_error::PrintProgramError for #ident {
9090
fn print<E>(&self)
9191
where
9292
E: 'static
9393
+ std::error::Error
94-
+ solana_program::decode_error::DecodeError<E>
95-
+ solana_program::program_error::PrintProgramError
94+
+ ::solana_program::decode_error::DecodeError<E>
95+
+ ::solana_program::program_error::PrintProgramError
9696
+ num_traits::FromPrimitive,
9797
{
9898
match self {

0 commit comments

Comments
 (0)