From 09ed7f670d9df77797da2f0731d6713ea0a1e387 Mon Sep 17 00:00:00 2001 From: Armani Ferrante Date: Sat, 30 Jan 2021 03:49:22 -0800 Subject: [PATCH] Allow procedural macro coupling --- src/ctor.rs | 3 --- src/idl.rs | 3 --- src/lib.rs | 2 ++ 3 files changed, 2 insertions(+), 6 deletions(-) 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;