diff --git a/substrate/client/block-builder/src/lib.rs b/substrate/client/block-builder/src/lib.rs index 480a759e30..2154a1f5f2 100644 --- a/substrate/client/block-builder/src/lib.rs +++ b/substrate/client/block-builder/src/lib.rs @@ -17,7 +17,7 @@ //! Substrate block builder //! //! This crate provides the [`BlockBuilder`] utility and the corresponding runtime api -//! [`BlockBuilder`](api::BlockBuilder).Error +//! [`BlockBuilder`](sp_block_builder::BlockBuilder).Error //! //! The block builder utility is used in the node as an abstraction over the runtime api to //! initialize a block, to push extrinsics and to finalize a block. diff --git a/substrate/frame/elections-phragmen/src/lib.rs b/substrate/frame/elections-phragmen/src/lib.rs index 6cb10f54c7..040ef00ac2 100644 --- a/substrate/frame/elections-phragmen/src/lib.rs +++ b/substrate/frame/elections-phragmen/src/lib.rs @@ -65,7 +65,7 @@ //! //! ##### Renouncing candidacy. //! -//! All candidates, elected or not, can renounce their candidacy. A call to [`renounce_candidacy`] +//! All candidates, elected or not, can renounce their candidacy. A call to [`Module::renounce_candidacy`] //! will always cause the candidacy bond to be refunded. //! //! Note that with the members being the default candidates for the next round and votes persisting diff --git a/substrate/frame/support/procedural/src/lib.rs b/substrate/frame/support/procedural/src/lib.rs index a9662f530a..17b1efdcd4 100644 --- a/substrate/frame/support/procedural/src/lib.rs +++ b/substrate/frame/support/procedural/src/lib.rs @@ -144,12 +144,12 @@ use proc_macro::TokenStream; /// /// * `#vis`: Set the visibility of the structure. `pub` or nothing. /// * `#name`: Name of the storage item, used as a prefix in storage. -/// * [optional] `get(fn #getter)`: Implements the function #getter to `Module`. -/// * [optional] `config(#field_name)`: `field_name` is optional if get is set. +/// * \[optional\] `get(fn #getter)`: Implements the function #getter to `Module`. +/// * \[optional\] `config(#field_name)`: `field_name` is optional if get is set. /// Will include the item in `GenesisConfig`. -/// * [optional] `build(#closure)`: Closure called with storage overlays. +/// * \[optional\] `build(#closure)`: Closure called with storage overlays. /// * `#type`: Storage type. -/// * [optional] `#default`: Value returned when none. +/// * \[optional\] `#default`: Value returned when none. /// /// Storage items are accessible in multiple ways: /// diff --git a/substrate/frame/support/src/dispatch.rs b/substrate/frame/support/src/dispatch.rs index 081574726a..df887fa2c4 100644 --- a/substrate/frame/support/src/dispatch.rs +++ b/substrate/frame/support/src/dispatch.rs @@ -106,7 +106,7 @@ impl Parameter for T where T: Codec + EncodeLike + Clone + Eq + fmt::Debug {} /// ### Shorthand Example /// /// The macro automatically expands a shorthand function declaration to return the -/// [`DispatchResult`] type. These functions are the same: +/// [`DispatchResult`](dispatch::DispatchResult) type. These functions are the same: /// /// ``` /// # #[macro_use] @@ -133,7 +133,7 @@ impl Parameter for T where T: Codec + EncodeLike + Clone + Eq + fmt::Debug {} /// ### Consuming only portions of the annotated static weight /// /// Per default a callable function consumes all of its static weight as declared via -/// the #[weight] attribute. However, there are use cases where only a portion of this +/// the #\[weight\] attribute. However, there are use cases where only a portion of this /// weight should be consumed. In that case the static weight is charged pre dispatch and /// the difference is refunded post dispatch. /// diff --git a/substrate/frame/transaction-payment/src/lib.rs b/substrate/frame/transaction-payment/src/lib.rs index fdcb9122a2..f6334c658a 100644 --- a/substrate/frame/transaction-payment/src/lib.rs +++ b/substrate/frame/transaction-payment/src/lib.rs @@ -24,10 +24,10 @@ //! chance to be included by the transaction queue. //! //! Additionally, this module allows one to configure: -//! - The mapping between one unit of weight to one unit of fee via [`WeightToFee`]. +//! - The mapping between one unit of weight to one unit of fee via [`Trait::WeightToFee`]. //! - A means of updating the fee for the next block, via defining a multiplier, based on the //! final state of the chain at the end of the previous block. This can be configured via -//! [`FeeMultiplierUpdate`] +//! [`Trait::FeeMultiplierUpdate`] #![cfg_attr(not(feature = "std"), no_std)] diff --git a/substrate/primitives/consensus/common/src/lib.rs b/substrate/primitives/consensus/common/src/lib.rs index 09dc031dc9..9f338ad1d4 100644 --- a/substrate/primitives/consensus/common/src/lib.rs +++ b/substrate/primitives/consensus/common/src/lib.rs @@ -152,7 +152,7 @@ pub trait Proposer { /// /// # Return /// - /// Returns a future that resolves to a [`Proposal`] or to [`Self::Error`]. + /// Returns a future that resolves to a [`Proposal`] or to [`Error`]. fn propose( &mut self, inherent_data: InherentData, diff --git a/substrate/primitives/core/src/crypto.rs b/substrate/primitives/core/src/crypto.rs index a76110c714..44d43c3a44 100644 --- a/substrate/primitives/core/src/crypto.rs +++ b/substrate/primitives/core/src/crypto.rs @@ -873,7 +873,7 @@ pub trait Pair: CryptoType + Sized + Clone + Send + Sync + 'static { /// Interprets the string `s` in order to generate a key pair. /// - /// See [`from_string_with_seed`](Self::from_string_with_seed) for more extensive documentation. + /// See [`from_string_with_seed`](Pair::from_string_with_seed) for more extensive documentation. #[cfg(feature = "std")] fn from_string(s: &str, password_override: Option<&str>) -> Result { Self::from_string_with_seed(s, password_override).map(|x| x.0) diff --git a/substrate/primitives/phragmen/src/reduce.rs b/substrate/primitives/phragmen/src/reduce.rs index ac4441ddc0..7153a9383c 100644 --- a/substrate/primitives/phragmen/src/reduce.rs +++ b/substrate/primitives/phragmen/src/reduce.rs @@ -639,7 +639,7 @@ fn reduce_all(assignments: &mut Vec>) -> u32 num_changed } -/// Reduce the given [`PhragmenResult`]. This removes redundant edges from without changing the +/// Reduce the given [`Vec>`]. This removes redundant edges from without changing the /// overall backing of any of the elected candidates. /// /// Returns the number of edges removed. diff --git a/substrate/primitives/runtime/src/traits.rs b/substrate/primitives/runtime/src/traits.rs index a8f4836e8e..59c2ed64e0 100644 --- a/substrate/primitives/runtime/src/traits.rs +++ b/substrate/primitives/runtime/src/traits.rs @@ -1301,7 +1301,7 @@ impl Printable for Tuple { } } -/// Something that can convert a [`BlockId`] to a number or a hash. +/// Something that can convert a [`BlockId`](crate::generic::BlockId) to a number or a hash. #[cfg(feature = "std")] pub trait BlockIdTo { /// The error type that will be returned by the functions. diff --git a/substrate/primitives/state-machine/src/overlayed_changes.rs b/substrate/primitives/state-machine/src/overlayed_changes.rs index f7773a8211..3816bb732a 100644 --- a/substrate/primitives/state-machine/src/overlayed_changes.rs +++ b/substrate/primitives/state-machine/src/overlayed_changes.rs @@ -98,9 +98,9 @@ pub struct StorageChanges { /// Offchain state changes to write to the offchain database. pub offchain_storage_changes: OffchainOverlayedChanges, /// A transaction for the backend that contains all changes from - /// [`main_storage_changes`](Self::main_storage_changes) and from - /// [`child_storage_changes`](Self::child_storage_changes). - /// [`offchain_storage_changes`](Self::offchain_storage_changes). + /// [`main_storage_changes`](StorageChanges::main_storage_changes) and from + /// [`child_storage_changes`](StorageChanges::child_storage_changes). + /// [`offchain_storage_changes`](StorageChanges::offchain_storage_changes). pub transaction: Transaction, /// The storage root after applying the transaction. pub transaction_storage_root: H::Out, diff --git a/substrate/utils/fork-tree/src/lib.rs b/substrate/utils/fork-tree/src/lib.rs index ba7e519ddf..be543e135f 100644 --- a/substrate/utils/fork-tree/src/lib.rs +++ b/substrate/utils/fork-tree/src/lib.rs @@ -306,7 +306,7 @@ impl ForkTree where } } - /// Same as [`find_node_where`](Self::find_node_where), but returns mutable reference. + /// Same as [`find_node_where`](ForkTree::find_node_where), but returns mutable reference. pub fn find_node_where_mut( &mut self, hash: &H, @@ -331,7 +331,7 @@ impl ForkTree where Ok(None) } - /// Same as [`find_node_where`](Self::find_node_where), but returns indexes. + /// Same as [`find_node_where`](ForkTree::find_node_where), but returns indexes. pub fn find_node_index_where( &self, hash: &H, diff --git a/substrate/utils/wasm-builder-runner/src/lib.rs b/substrate/utils/wasm-builder-runner/src/lib.rs index 0e4b1421f8..cea7d38641 100644 --- a/substrate/utils/wasm-builder-runner/src/lib.rs +++ b/substrate/utils/wasm-builder-runner/src/lib.rs @@ -169,7 +169,7 @@ impl WasmBuilderSelectSource { /// 3. Select the source of the `wasm-builder` crate using the methods of /// [`WasmBuilderSelectSource`]. /// 4. Set additional `RUST_FLAGS` or a different name for the file containing the WASM code -/// using methods of [`Self`]. +/// using methods of [`WasmBuilder`]. /// 5. Build the WASM binary using [`Self::build`]. pub struct WasmBuilder { /// Where should we pull the `wasm-builder` crate from.