diff --git a/src/ctor.rs b/src/ctor.rs index a43ef929a..9ad5351ff 100644 --- a/src/ctor.rs +++ b/src/ctor.rs @@ -2,9 +2,6 @@ use crate::{Accounts, Sysvar}; use solana_program::account_info::AccountInfo; use solana_program::sysvar::rent::Rent; -// Needed for the `Accounts` macro. -use crate as anchor_lang; - // The Ctor accounts that can be used to create any account within the program // itself (instead of creating the account on the client). // diff --git a/src/idl.rs b/src/idl.rs index 407e545ed..759cafcf7 100644 --- a/src/idl.rs +++ b/src/idl.rs @@ -16,9 +16,6 @@ use crate::prelude::*; use solana_program::pubkey::Pubkey; -// Needed for the `Accounts` macro. -use crate as anchor_lang; - // The first 8 bytes of an instruction to create or modify the IDL account. This // instruction is defined outside the main program's instruction enum, so that // the enum variant tags can align with function source order. diff --git a/src/lib.rs b/src/lib.rs index eb50ff0ee..95d57927e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -21,6 +21,8 @@ //! //! Presented here are the Rust primitives for building on Solana. +extern crate self as anchor_lang; + use solana_program::account_info::AccountInfo; use solana_program::instruction::AccountMeta; use solana_program::program_error::ProgramError;