diff --git a/substrate/client/chain-spec/derive/src/lib.rs b/substrate/client/chain-spec/derive/src/lib.rs index 4648e3f78a..0dc053f7e3 100644 --- a/substrate/client/chain-spec/derive/src/lib.rs +++ b/substrate/client/chain-spec/derive/src/lib.rs @@ -16,8 +16,6 @@ //! Macros to derive chain spec extension traits implementation. -extern crate proc_macro; - mod impls; use proc_macro::TokenStream; diff --git a/substrate/frame/balances/src/lib.rs b/substrate/frame/balances/src/lib.rs index 6122e55754..6f4be24515 100644 --- a/substrate/frame/balances/src/lib.rs +++ b/substrate/frame/balances/src/lib.rs @@ -160,7 +160,6 @@ mod benchmarking; use sp_std::prelude::*; use sp_std::{cmp, result, mem, fmt::Debug, ops::BitOr, convert::Infallible}; -use sp_io::hashing::twox_64; use codec::{Codec, Encode, Decode}; use frame_support::{ StorageValue, Parameter, decl_event, decl_storage, decl_module, decl_error, ensure, @@ -179,9 +178,6 @@ use sp_runtime::{ }, }; use frame_system::{self as system, ensure_signed, ensure_root}; -use frame_support::storage::migration::{ - get_storage_value, take_storage_value, put_storage_value, StorageIterator, have_storage_value -}; pub use self::imbalances::{PositiveImbalance, NegativeImbalance}; diff --git a/substrate/frame/democracy/src/lib.rs b/substrate/frame/democracy/src/lib.rs index d69830cc45..2418bc7c3d 100644 --- a/substrate/frame/democracy/src/lib.rs +++ b/substrate/frame/democracy/src/lib.rs @@ -1557,12 +1557,11 @@ mod tests { }; use sp_core::H256; use sp_runtime::{ - traits::{BlakeTwo256, IdentityLookup, Bounded, BadOrigin, OnRuntimeUpgrade}, + traits::{BlakeTwo256, IdentityLookup, Bounded, BadOrigin}, testing::Header, Perbill, }; use pallet_balances::{BalanceLock, Error as BalancesError}; use frame_system::EnsureSignedBy; - use sp_storage::Storage; const AYE: Vote = Vote{ aye: true, conviction: Conviction::None }; const NAY: Vote = Vote{ aye: false, conviction: Conviction::None }; diff --git a/substrate/frame/staking/reward-curve/src/lib.rs b/substrate/frame/staking/reward-curve/src/lib.rs index 51af0a33a3..d000afc49b 100644 --- a/substrate/frame/staking/reward-curve/src/lib.rs +++ b/substrate/frame/staking/reward-curve/src/lib.rs @@ -1,4 +1,20 @@ -extern crate proc_macro; +// Copyright 2017-2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +//! Proc macro to generate the reward curve functions and tests. mod log; diff --git a/substrate/frame/support/procedural/src/lib.rs b/substrate/frame/support/procedural/src/lib.rs index abe78d4f5b..f4b82a09cc 100644 --- a/substrate/frame/support/procedural/src/lib.rs +++ b/substrate/frame/support/procedural/src/lib.rs @@ -20,8 +20,6 @@ #![recursion_limit="512"] -extern crate proc_macro; - mod storage; mod construct_runtime; diff --git a/substrate/frame/support/procedural/tools/derive/src/lib.rs b/substrate/frame/support/procedural/tools/derive/src/lib.rs index f020c2a2fa..0c5930892b 100644 --- a/substrate/frame/support/procedural/tools/derive/src/lib.rs +++ b/substrate/frame/support/procedural/tools/derive/src/lib.rs @@ -20,8 +20,6 @@ #![recursion_limit = "128"] -extern crate proc_macro; - use proc_macro::TokenStream; use proc_macro2::Span; use syn::parse_macro_input; diff --git a/substrate/frame/vesting/src/lib.rs b/substrate/frame/vesting/src/lib.rs index 0c6f55be00..e7d0bd3c18 100644 --- a/substrate/frame/vesting/src/lib.rs +++ b/substrate/frame/vesting/src/lib.rs @@ -348,9 +348,8 @@ mod tests { use sp_runtime::{ Perbill, testing::Header, - traits::{BlakeTwo256, IdentityLookup, Identity, OnRuntimeUpgrade}, + traits::{BlakeTwo256, IdentityLookup, Identity}, }; - use sp_storage::Storage; impl_outer_origin! { pub enum Origin for Test where system = frame_system {} diff --git a/substrate/primitives/api/proc-macro/src/lib.rs b/substrate/primitives/api/proc-macro/src/lib.rs index a1fd11188f..9e5908717c 100644 --- a/substrate/primitives/api/proc-macro/src/lib.rs +++ b/substrate/primitives/api/proc-macro/src/lib.rs @@ -17,7 +17,6 @@ //! Macros for declaring and implementing runtime apis. #![recursion_limit = "512"] -extern crate proc_macro; use proc_macro::TokenStream; diff --git a/substrate/primitives/debug-derive/src/lib.rs b/substrate/primitives/debug-derive/src/lib.rs index f338c2869e..68bbb94e1b 100644 --- a/substrate/primitives/debug-derive/src/lib.rs +++ b/substrate/primitives/debug-derive/src/lib.rs @@ -31,8 +31,6 @@ //! assert_eq!(format!("{:?}", MyStruct), "MyStruct"); //! ``` -extern crate proc_macro; - mod impls; use proc_macro::TokenStream; diff --git a/substrate/primitives/runtime-interface/proc-macro/src/lib.rs b/substrate/primitives/runtime-interface/proc-macro/src/lib.rs index 47c9fd6bb7..2ed8b1a228 100644 --- a/substrate/primitives/runtime-interface/proc-macro/src/lib.rs +++ b/substrate/primitives/runtime-interface/proc-macro/src/lib.rs @@ -25,8 +25,6 @@ //! 3. The [`PassByEnum`](derive.PassByInner.html) derive macro for implementing `PassBy` with `Enum`. //! 4. The [`PassByInner`](derive.PassByInner.html) derive macro for implementing `PassBy` with `Inner`. -extern crate proc_macro; - use syn::{parse_macro_input, ItemTrait, DeriveInput}; mod pass_by; diff --git a/substrate/primitives/sr-api/proc-macro/src/lib.rs b/substrate/primitives/sr-api/proc-macro/src/lib.rs index 589d0749a0..adb3b9636d 100644 --- a/substrate/primitives/sr-api/proc-macro/src/lib.rs +++ b/substrate/primitives/sr-api/proc-macro/src/lib.rs @@ -17,7 +17,6 @@ //! Macros for declaring and implementing runtime apis. #![recursion_limit = "512"] -extern crate proc_macro; use proc_macro::TokenStream;