Improve frame umbrella crate doc experience (#4007)

1. Add `#[doc(no_inline)]` to frame umbrella crate re-exports that
eventually resolve to `frame_support_procedural` so docs don't look like
the screenshot below and instead link to the proper `frame-support`
docs.
<img width="1512" alt="Screenshot 2024-04-05 at 20 05 01"
src="https://github.com/paritytech/polkadot-sdk/assets/16665596/a41daa4c-ebca-44a4-9fea-f9f336314e13">


2. Remove `"Rust-Analyzer Users: "` prefix from
`frame_support_procedural` doc comments, since these doc comments are
visible in the web documentation and possible to stumble upon especially
when navigating from the frame umbrella crate.

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
Liam Aharon
2024-04-06 21:02:37 +11:00
committed by GitHub
parent 9d62618928
commit 74d6309c0c
2 changed files with 41 additions and 74 deletions
+7 -7
View File
@@ -53,24 +53,24 @@
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg(feature = "experimental")]
/// Exports the main pallet macro. This can wrap a `mod pallet` and will transform it into
/// being a pallet, eg `#[polkadot_sdk_frame::pallet] mod pallet { .. }`.
///
/// Note that this is not part of the prelude, in order to make it such that the common way to
/// define a macro is `#[polkadot_sdk_frame::pallet] mod pallet { .. }`, followed by
/// `#[pallet::foo]`, `#[pallet::bar]` inside the mod.
#[doc(no_inline)]
pub use frame_support::pallet;
#[doc(no_inline)]
pub use frame_support::pallet_macros::{import_section, pallet_section};
/// The logging library of the runtime. Can normally be the classic `log` crate.
pub use log;
/// A list of all macros used within the main [`pallet`] macro.
/// Macros used within the main [`pallet`] macro.
///
/// Note: All of these macros are "stubs" and not really usable outside `#[pallet] mod pallet { ..
/// }`. They are mainly provided for documentation and IDE support.
///
/// To view a list of all the macros and their documentation, follow the links in the 'Re-exports'
/// section below:
pub mod pallet_macros {
#[doc(no_inline)]
pub use frame_support::{derive_impl, pallet, pallet_macros::*};
}