diff --git a/substrate/srml/staking/src/lib.rs b/substrate/srml/staking/src/lib.rs index 1901752666d84427d1e6cf63cdfcef3befe91df3..6a9846e07fddd5ed14aed85db4827c877458400a 100644 --- a/substrate/srml/staking/src/lib.rs +++ b/substrate/srml/staking/src/lib.rs @@ -187,15 +187,16 @@ //! A validator can be _reported_ to be offline at any point via the public function //! [`on_offline_validator`](enum.Call.html#variant.on_offline_validator). Each validator declares how many times it //! can be _reported_ before it actually gets slashed via its -//! [`unstake_threshold`](./struct.ValidatorPrefs.html#structfield.unstake_threshold). +//! [`ValidatorPrefs::unstake_threshold`](./struct.ValidatorPrefs.html#structfield.unstake_threshold). //! //! On top of this, the Staking module also introduces an //! [`OfflineSlashGrace`](./struct.Module.html#method.offline_slash_grace), which applies //! to all validators and prevents them from getting immediately slashed. //! //! Essentially, a validator gets slashed once they have been reported more than -//! [`OfflineSlashGrace`] + [`unstake_threshold`] times. Getting slashed due to offline report always leads -//! to being _unstaked_ (_i.e._ removed as a validator candidate) as the consequence. +//! [`OfflineSlashGrace`] + [`ValidatorPrefs::unstake_threshold`] times. Getting slashed due to +//! offline report always leads to being _unstaked_ (_i.e._ removed as a validator candidate) as +//! the consequence. //! //! The base slash value is computed _per slash-event_ by multiplying //! [`OfflineSlash`](./struct.Module.html#method.offline_slash) and the `total` `Exposure`. This value is then diff --git a/substrate/srml/support/src/dispatch.rs b/substrate/srml/support/src/dispatch.rs index aa6282c773b27140077516d4ded6e1e3fb2d50ca..f2db609dc38b68df74e303fd1b7c6b1adb05fc5a 100644 --- a/substrate/srml/support/src/dispatch.rs +++ b/substrate/srml/support/src/dispatch.rs @@ -773,6 +773,7 @@ macro_rules! decl_module { $type, } variant $fn_name; + $( #[doc = $doc_attr] )* $( $rest )* } }; @@ -800,6 +801,7 @@ macro_rules! decl_module { $type, } variant $fn_name; + $( #[doc = $doc_attr] )* $( $rest )* } }; @@ -859,7 +861,10 @@ macro_rules! decl_module { (@imp $(#[$attr:meta])* - pub struct $mod_type:ident<$trait_instance:ident: $trait_name:ident$(<I>, $instance:ident: $instantiable:path $(= $module_default_instance:path)?)?> + pub struct $mod_type:ident< + $trait_instance:ident: $trait_name:ident + $(<I>, $instance:ident: $instantiable:path $(= $module_default_instance:path)?)? + > for enum $call_type:ident where origin: $origin_type:ty, system = $system:ident { $( $(#[doc = $doc_attr:tt])* @@ -881,7 +886,10 @@ macro_rules! decl_module { // Workaround for https://github.com/rust-lang/rust/issues/26925 . Remove when sorted. #[derive(Clone, Copy, PartialEq, Eq)] #[cfg_attr(feature = "std", derive(Debug))] - pub struct $mod_type<$trait_instance: $trait_name $(<I>, $instance: $instantiable $( = $module_default_instance)?)?>($crate::rstd::marker::PhantomData<($trait_instance $(, $instance)?)>); + pub struct $mod_type< + $trait_instance: $trait_name + $(<I>, $instance: $instantiable $( = $module_default_instance)?)? + >($crate::rstd::marker::PhantomData<($trait_instance $(, $instance)?)>); $crate::decl_module! { @impl_on_initialize