Files
pezkuwi-subxt/substrate/frame/support/test/pallet/src/lib.rs
T
Bastian Köcher 522e5d13aa 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
2022-03-21 11:35:49 +01:00

57 lines
1.4 KiB
Rust

// This file is part of Substrate.
// Copyright (C) 2021-2022 Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Testing pallet macro
// Ensure docs are propagated properly by the macros.
#![warn(missing_docs)]
pub use pallet::*;
#[frame_support::pallet]
pub mod pallet {
#[allow(unused_imports)]
use frame_support::pallet_prelude::*;
#[allow(unused_imports)]
use frame_system::pallet_prelude::*;
#[pallet::pallet]
pub struct Pallet<T>(_);
#[pallet::config]
pub trait Config: frame_system::Config {}
/// I'm the documentation
#[pallet::storage]
pub type Value<T> = StorageValue<Value = u32>;
#[pallet::genesis_config]
#[cfg_attr(feature = "std", derive(Default))]
pub struct GenesisConfig {}
#[pallet::genesis_build]
impl<T: Config> GenesisBuild<T> for GenesisConfig {
fn build(&self) {}
}
#[pallet::error]
pub enum Error<T> {
/// Something failed
Test,
}
}