Fix tons of warnings in newest nightly (#2784)

* Fix tons of warnings in newest nightly

* Fix sr-api-macro doc tests
This commit is contained in:
Bastian Köcher
2019-06-04 20:09:49 +02:00
committed by GitHub
parent 9700029203
commit 6142f95611
73 changed files with 359 additions and 316 deletions
+12 -3
View File
@@ -54,11 +54,11 @@ mod utils;
/// # extern crate substrate_primitives;
/// #
/// # use runtime_primitives::traits::GetNodeBlockType;
/// # use test_client::runtime::Block;
/// # use test_client::runtime::{Block, Header};
/// #
/// # /// The declaration of the `Runtime` type and the implementation of the `GetNodeBlockType`
/// # /// trait are done by the `construct_runtime!` macro in a real runtime.
/// # struct Runtime {}
/// # pub struct Runtime {}
/// # impl GetNodeBlockType for Runtime {
/// # type NodeBlock = Block;
/// # }
@@ -78,6 +78,15 @@ mod utils;
///
/// /// All runtime api implementations need to be done in one call of the macro!
/// impl_runtime_apis! {
/// # impl client::runtime_api::Core<Block> for Runtime {
/// # fn version() -> client::runtime_api::RuntimeVersion {
/// # unimplemented!()
/// # }
/// # fn execute_block(_block: Block) {}
/// # fn initialize_block(_header: &Header) {}
/// # fn authorities() -> Vec<runtime_primitives::traits::AuthorityIdFor<Block>> { unimplemented!() }
/// # }
///
/// impl self::Balance<Block> for Runtime {
/// fn get_balance() -> u64 {
/// 1
@@ -176,7 +185,7 @@ pub fn impl_runtime_apis(input: TokenStream) -> TokenStream {
/// ///
/// /// Is callable by `set_balance_before_version_2`.
/// #[changed_in(2)]
/// fn set_balance(val: u8);
/// fn set_balance(val: u16);
/// /// In version 2, we added this new function.
/// fn increase_balance(val: u64);
/// }