pallet-macro: Ensure that building with missing_docs works (#11075)

* pallet-macro: Ensure that building with `missing_docs` works

Before this pr it was failing when compiling with `missing_docs`, because the macro was generating
functions etc without the appropriate docs. In the case of this pr it is mainly about hiding these
functions in the docs as they are internal api anyway.

* Fix UI test
This commit is contained in:
Bastian Köcher
2022-03-21 11:35:49 +01:00
committed by GitHub
parent 190c6461f2
commit 522e5d13aa
7 changed files with 30 additions and 5 deletions
@@ -56,10 +56,10 @@ note: required by a bound in `encode_to`
= note: this error originates in the derive macro `frame_support::codec::Encode` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `<T as pallet::Config>::Bar: WrapperTypeDecode` is not satisfied
--> tests/pallet_ui/call_argument_invalid_bound_2.rs:20:36
--> tests/pallet_ui/call_argument_invalid_bound_2.rs:17:12
|
20 | pub fn foo(origin: OriginFor<T>, bar: T::Bar) -> DispatchResultWithPostInfo {
| ^^^ the trait `WrapperTypeDecode` is not implemented for `<T as pallet::Config>::Bar`
17 | #[pallet::call]
| ^^^^ the trait `WrapperTypeDecode` is not implemented for `<T as pallet::Config>::Bar`
|
= note: required because of the requirements on the impl of `Decode` for `<T as pallet::Config>::Bar`
note: required by a bound in `parity_scale_codec::Decode::decode`