mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 19:17:58 +00:00
Add missing licenses and tune the scanning workflow (#1288)
* Add missing Cumulus licenses * Typo * Add missing Substrate licenses * Single job checking the sub-repos in steps * Remove dates * Remove dates * Add missing (C) * Update FRAME UI tests Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update more UI tests Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet [foo]]
|
||||
mod foo {
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: Invalid pallet macro call: unexpected attribute. Macro call must be bare, such as `#[frame_support::pallet]` or `#[pallet]`, or must specify the `dev_mode` attribute, such as `#[frame_support::pallet(dev_mode)]` or #[pallet(dev_mode)].
|
||||
--> tests/pallet_ui/attr_non_empty.rs:1:26
|
||||
|
|
||||
1 | #[frame_support::pallet [foo]]
|
||||
| ^^^
|
||||
--> tests/pallet_ui/attr_non_empty.rs:18:26
|
||||
|
|
||||
18 | #[frame_support::pallet [foo]]
|
||||
| ^^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::{Hooks, DispatchResultWithPostInfo};
|
||||
|
||||
@@ -4,17 +4,17 @@ error: use of deprecated constant `pallet::warnings::ConstantWeight_0::_w`:
|
||||
|
||||
For more info see:
|
||||
<https://github.com/paritytech/substrate/pull/13798>
|
||||
--> tests/pallet_ui/call_argument_invalid_bound.rs:19:20
|
||||
--> tests/pallet_ui/call_argument_invalid_bound.rs:36:20
|
||||
|
|
||||
19 | #[pallet::weight(0)]
|
||||
36 | #[pallet::weight(0)]
|
||||
| ^
|
||||
|
|
||||
= note: `-D deprecated` implied by `-D warnings`
|
||||
|
||||
error[E0277]: `<T as pallet::Config>::Bar` doesn't implement `std::fmt::Debug`
|
||||
--> tests/pallet_ui/call_argument_invalid_bound.rs:21:36
|
||||
--> tests/pallet_ui/call_argument_invalid_bound.rs:38:36
|
||||
|
|
||||
21 | pub fn foo(origin: OriginFor<T>, _bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
38 | pub fn foo(origin: OriginFor<T>, _bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
| ^^^^ `<T as pallet::Config>::Bar` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
|
||||
|
|
||||
= help: the trait `std::fmt::Debug` is not implemented for `<T as pallet::Config>::Bar`
|
||||
@@ -22,13 +22,13 @@ error[E0277]: `<T as pallet::Config>::Bar` doesn't implement `std::fmt::Debug`
|
||||
= note: required for the cast from `&<T as pallet::Config>::Bar` to the object type `dyn std::fmt::Debug`
|
||||
|
||||
error[E0277]: the trait bound `<T as pallet::Config>::Bar: Clone` is not satisfied
|
||||
--> tests/pallet_ui/call_argument_invalid_bound.rs:21:36
|
||||
--> tests/pallet_ui/call_argument_invalid_bound.rs:38:36
|
||||
|
|
||||
21 | pub fn foo(origin: OriginFor<T>, _bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
38 | pub fn foo(origin: OriginFor<T>, _bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
| ^^^^ the trait `Clone` is not implemented for `<T as pallet::Config>::Bar`
|
||||
|
||||
error[E0369]: binary operation `==` cannot be applied to type `&<T as pallet::Config>::Bar`
|
||||
--> tests/pallet_ui/call_argument_invalid_bound.rs:21:36
|
||||
--> tests/pallet_ui/call_argument_invalid_bound.rs:38:36
|
||||
|
|
||||
21 | pub fn foo(origin: OriginFor<T>, _bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
38 | pub fn foo(origin: OriginFor<T>, _bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
| ^^^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::{Hooks, DispatchResultWithPostInfo};
|
||||
|
||||
@@ -4,17 +4,17 @@ error: use of deprecated constant `pallet::warnings::ConstantWeight_0::_w`:
|
||||
|
||||
For more info see:
|
||||
<https://github.com/paritytech/substrate/pull/13798>
|
||||
--> tests/pallet_ui/call_argument_invalid_bound_2.rs:19:20
|
||||
--> tests/pallet_ui/call_argument_invalid_bound_2.rs:36:20
|
||||
|
|
||||
19 | #[pallet::weight(0)]
|
||||
36 | #[pallet::weight(0)]
|
||||
| ^
|
||||
|
|
||||
= note: `-D deprecated` implied by `-D warnings`
|
||||
|
||||
error[E0277]: `<T as pallet::Config>::Bar` doesn't implement `std::fmt::Debug`
|
||||
--> tests/pallet_ui/call_argument_invalid_bound_2.rs:21:36
|
||||
--> tests/pallet_ui/call_argument_invalid_bound_2.rs:38:36
|
||||
|
|
||||
21 | pub fn foo(origin: OriginFor<T>, _bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
38 | pub fn foo(origin: OriginFor<T>, _bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
| ^^^^ `<T as pallet::Config>::Bar` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
|
||||
|
|
||||
= help: the trait `std::fmt::Debug` is not implemented for `<T as pallet::Config>::Bar`
|
||||
@@ -22,32 +22,32 @@ error[E0277]: `<T as pallet::Config>::Bar` doesn't implement `std::fmt::Debug`
|
||||
= note: required for the cast from `&<T as pallet::Config>::Bar` to the object type `dyn std::fmt::Debug`
|
||||
|
||||
error[E0277]: the trait bound `<T as pallet::Config>::Bar: Clone` is not satisfied
|
||||
--> tests/pallet_ui/call_argument_invalid_bound_2.rs:21:36
|
||||
--> tests/pallet_ui/call_argument_invalid_bound_2.rs:38:36
|
||||
|
|
||||
21 | pub fn foo(origin: OriginFor<T>, _bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
38 | pub fn foo(origin: OriginFor<T>, _bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
| ^^^^ the trait `Clone` is not implemented for `<T as pallet::Config>::Bar`
|
||||
|
||||
error[E0369]: binary operation `==` cannot be applied to type `&<T as pallet::Config>::Bar`
|
||||
--> tests/pallet_ui/call_argument_invalid_bound_2.rs:21:36
|
||||
--> tests/pallet_ui/call_argument_invalid_bound_2.rs:38:36
|
||||
|
|
||||
21 | pub fn foo(origin: OriginFor<T>, _bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
38 | pub fn foo(origin: OriginFor<T>, _bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
| ^^^^
|
||||
|
||||
error[E0277]: the trait bound `<T as pallet::Config>::Bar: WrapperTypeEncode` is not satisfied
|
||||
--> tests/pallet_ui/call_argument_invalid_bound_2.rs:21:36
|
||||
--> tests/pallet_ui/call_argument_invalid_bound_2.rs:38:36
|
||||
|
|
||||
1 | #[frame_support::pallet]
|
||||
18 | #[frame_support::pallet]
|
||||
| ------------------------ required by a bound introduced by this call
|
||||
...
|
||||
21 | pub fn foo(origin: OriginFor<T>, _bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
38 | pub fn foo(origin: OriginFor<T>, _bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
| ^^^^ the trait `WrapperTypeEncode` is not implemented for `<T as pallet::Config>::Bar`
|
||||
|
|
||||
= note: required for `<T as pallet::Config>::Bar` to implement `Encode`
|
||||
|
||||
error[E0277]: the trait bound `<T as pallet::Config>::Bar: WrapperTypeDecode` is not satisfied
|
||||
--> tests/pallet_ui/call_argument_invalid_bound_2.rs:17:12
|
||||
--> tests/pallet_ui/call_argument_invalid_bound_2.rs:34:12
|
||||
|
|
||||
17 | #[pallet::call]
|
||||
34 | #[pallet::call]
|
||||
| ^^^^ the trait `WrapperTypeDecode` is not implemented for `<T as pallet::Config>::Bar`
|
||||
|
|
||||
= note: required for `<T as pallet::Config>::Bar` to implement `Decode`
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use codec::{Decode, Encode};
|
||||
|
||||
@@ -4,17 +4,17 @@ error: use of deprecated constant `pallet::warnings::ConstantWeight_0::_w`:
|
||||
|
||||
For more info see:
|
||||
<https://github.com/paritytech/substrate/pull/13798>
|
||||
--> tests/pallet_ui/call_argument_invalid_bound_3.rs:21:20
|
||||
--> tests/pallet_ui/call_argument_invalid_bound_3.rs:38:20
|
||||
|
|
||||
21 | #[pallet::weight(0)]
|
||||
38 | #[pallet::weight(0)]
|
||||
| ^
|
||||
|
|
||||
= note: `-D deprecated` implied by `-D warnings`
|
||||
|
||||
error[E0277]: `Bar` doesn't implement `std::fmt::Debug`
|
||||
--> tests/pallet_ui/call_argument_invalid_bound_3.rs:23:36
|
||||
--> tests/pallet_ui/call_argument_invalid_bound_3.rs:40:36
|
||||
|
|
||||
23 | pub fn foo(origin: OriginFor<T>, _bar: Bar) -> DispatchResultWithPostInfo {
|
||||
40 | pub fn foo(origin: OriginFor<T>, _bar: Bar) -> DispatchResultWithPostInfo {
|
||||
| ^^^^ `Bar` cannot be formatted using `{:?}`
|
||||
|
|
||||
= help: the trait `std::fmt::Debug` is not implemented for `Bar`
|
||||
@@ -23,6 +23,6 @@ error[E0277]: `Bar` doesn't implement `std::fmt::Debug`
|
||||
= note: required for the cast from `&Bar` to the object type `dyn std::fmt::Debug`
|
||||
help: consider annotating `Bar` with `#[derive(Debug)]`
|
||||
|
|
||||
17 + #[derive(Debug)]
|
||||
18 | struct Bar;
|
||||
34 + #[derive(Debug)]
|
||||
35 | struct Bar;
|
||||
|
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::DispatchResultWithPostInfo;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
error: Call indices are conflicting: Both functions foo and bar are at index 10
|
||||
--> tests/pallet_ui/call_conflicting_indices.rs:15:10
|
||||
--> tests/pallet_ui/call_conflicting_indices.rs:32:10
|
||||
|
|
||||
15 | pub fn foo(origin: OriginFor<T>) -> DispatchResultWithPostInfo {}
|
||||
32 | pub fn foo(origin: OriginFor<T>) -> DispatchResultWithPostInfo {}
|
||||
| ^^^
|
||||
|
||||
error: Call indices are conflicting: Both functions foo and bar are at index 10
|
||||
--> tests/pallet_ui/call_conflicting_indices.rs:19:10
|
||||
--> tests/pallet_ui/call_conflicting_indices.rs:36:10
|
||||
|
|
||||
19 | pub fn bar(origin: OriginFor<T>) -> DispatchResultWithPostInfo {}
|
||||
36 | pub fn bar(origin: OriginFor<T>) -> DispatchResultWithPostInfo {}
|
||||
| ^^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::DispatchResultWithPostInfo;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: Number literal must not have a suffix
|
||||
--> tests/pallet_ui/call_index_has_suffix.rs:14:30
|
||||
--> tests/pallet_ui/call_index_has_suffix.rs:31:30
|
||||
|
|
||||
14 | #[pallet::call_index(0something)]
|
||||
31 | #[pallet::call_index(0something)]
|
||||
| ^^^^^^^^^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::DispatchResultWithPostInfo;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: expected `weight` or `call_index`
|
||||
--> tests/pallet_ui/call_invalid_attr.rs:14:13
|
||||
--> tests/pallet_ui/call_invalid_attr.rs:31:13
|
||||
|
|
||||
14 | #[pallet::weird_attr]
|
||||
31 | #[pallet::weird_attr]
|
||||
| ^^^^^^^^^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::Hooks;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: Invalid pallet::call, only method accepted
|
||||
--> $DIR/call_invalid_const.rs:17:3
|
||||
--> tests/pallet_ui/call_invalid_const.rs:34:3
|
||||
|
|
||||
17 | const Foo: u8 = 3u8;
|
||||
34 | const Foo: u8 = 3u8;
|
||||
| ^^^^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::DispatchResultWithPostInfo;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: number too large to fit in target type
|
||||
--> tests/pallet_ui/call_invalid_index.rs:15:24
|
||||
--> tests/pallet_ui/call_invalid_index.rs:32:24
|
||||
|
|
||||
15 | #[pallet::call_index(256)]
|
||||
32 | #[pallet::call_index(256)]
|
||||
| ^^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::Hooks;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
error: Invalid type: expected `OriginFor<T>`
|
||||
--> $DIR/call_invalid_origin_type.rs:17:22
|
||||
--> tests/pallet_ui/call_invalid_origin_type.rs:34:22
|
||||
|
|
||||
17 | pub fn foo(origin: u8) {}
|
||||
34 | pub fn foo(origin: u8) {}
|
||||
| ^^
|
||||
|
||||
error: expected `OriginFor`
|
||||
--> $DIR/call_invalid_origin_type.rs:17:22
|
||||
--> tests/pallet_ui/call_invalid_origin_type.rs:34:22
|
||||
|
|
||||
17 | pub fn foo(origin: u8) {}
|
||||
34 | pub fn foo(origin: u8) {}
|
||||
| ^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::Hooks;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: expected `DispatchResultWithPostInfo` or `DispatchResult`
|
||||
--> tests/pallet_ui/call_invalid_return.rs:17:39
|
||||
--> tests/pallet_ui/call_invalid_return.rs:34:39
|
||||
|
|
||||
17 | pub fn foo(origin: OriginFor<T>) -> ::DispatchResult { todo!() }
|
||||
34 | pub fn foo(origin: OriginFor<T>) -> ::DispatchResult { todo!() }
|
||||
| ^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::{Hooks, DispatchResultWithPostInfo};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: Invalid pallet::call, dispatchable function must be public: `pub fn`
|
||||
--> $DIR/call_invalid_vis.rs:20:3
|
||||
--> tests/pallet_ui/call_invalid_vis.rs:37:3
|
||||
|
|
||||
20 | fn foo(origin: OriginFor<T>) -> DispatchResultWithPostInfo {
|
||||
37 | fn foo(origin: OriginFor<T>) -> DispatchResultWithPostInfo {
|
||||
| ^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::{Hooks, DispatchResultWithPostInfo};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: Invalid pallet::call, dispatchable function must be public: `pub fn`
|
||||
--> $DIR/call_invalid_vis_2.rs:20:3
|
||||
--> tests/pallet_ui/call_invalid_vis_2.rs:37:3
|
||||
|
|
||||
20 | pub(crate) fn foo(origin: OriginFor<T>) -> DispatchResultWithPostInfo {
|
||||
37 | pub(crate) fn foo(origin: OriginFor<T>) -> DispatchResultWithPostInfo {
|
||||
| ^^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::DispatchResult;
|
||||
|
||||
@@ -5,9 +5,9 @@ error: use of deprecated constant `pallet::warnings::ImplicitCallIndex_0::_w`:
|
||||
For more info see:
|
||||
<https://github.com/paritytech/substrate/pull/12891>
|
||||
<https://github.com/paritytech/substrate/pull/11381>
|
||||
--> tests/pallet_ui/call_missing_index.rs:15:10
|
||||
--> tests/pallet_ui/call_missing_index.rs:32:10
|
||||
|
|
||||
15 | pub fn foo(_: OriginFor<T>) -> DispatchResult {
|
||||
32 | pub fn foo(_: OriginFor<T>) -> DispatchResult {
|
||||
| ^^^
|
||||
|
|
||||
= note: `-D deprecated` implied by `-D warnings`
|
||||
@@ -19,9 +19,9 @@ error: use of deprecated constant `pallet::warnings::ImplicitCallIndex_1::_w`:
|
||||
For more info see:
|
||||
<https://github.com/paritytech/substrate/pull/12891>
|
||||
<https://github.com/paritytech/substrate/pull/11381>
|
||||
--> tests/pallet_ui/call_missing_index.rs:20:10
|
||||
--> tests/pallet_ui/call_missing_index.rs:37:10
|
||||
|
|
||||
20 | pub fn bar(_: OriginFor<T>) -> DispatchResult {
|
||||
37 | pub fn bar(_: OriginFor<T>) -> DispatchResult {
|
||||
| ^^^
|
||||
|
||||
error: use of deprecated constant `pallet::warnings::ConstantWeight_0::_w`:
|
||||
@@ -30,9 +30,9 @@ error: use of deprecated constant `pallet::warnings::ConstantWeight_0::_w`:
|
||||
|
||||
For more info see:
|
||||
<https://github.com/paritytech/substrate/pull/13798>
|
||||
--> tests/pallet_ui/call_missing_index.rs:14:20
|
||||
--> tests/pallet_ui/call_missing_index.rs:31:20
|
||||
|
|
||||
14 | #[pallet::weight(0)]
|
||||
31 | #[pallet::weight(0)]
|
||||
| ^
|
||||
|
||||
error: use of deprecated constant `pallet::warnings::ConstantWeight_1::_w`:
|
||||
@@ -41,7 +41,7 @@ error: use of deprecated constant `pallet::warnings::ConstantWeight_1::_w`:
|
||||
|
||||
For more info see:
|
||||
<https://github.com/paritytech/substrate/pull/13798>
|
||||
--> tests/pallet_ui/call_missing_index.rs:19:20
|
||||
--> tests/pallet_ui/call_missing_index.rs:36:20
|
||||
|
|
||||
19 | #[pallet::weight(0)]
|
||||
36 | #[pallet::weight(0)]
|
||||
| ^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::{Hooks, DispatchResultWithPostInfo};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
error: A pallet::call requires either a concrete `#[pallet::weight($expr)]` or an
|
||||
inherited weight from the `#[pallet:call(weight($type))]` attribute, but
|
||||
none were given.
|
||||
--> tests/pallet_ui/call_missing_weight.rs:17:7
|
||||
--> tests/pallet_ui/call_missing_weight.rs:34:7
|
||||
|
|
||||
17 | pub fn foo(origin: OriginFor<T>) -> DispatchResultWithPostInfo {}
|
||||
34 | pub fn foo(origin: OriginFor<T>) -> DispatchResultWithPostInfo {}
|
||||
| ^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::DispatchResultWithPostInfo;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: Invalid pallet::call, too many call_index attributes given
|
||||
--> tests/pallet_ui/call_multiple_call_index.rs:17:7
|
||||
--> tests/pallet_ui/call_multiple_call_index.rs:34:7
|
||||
|
|
||||
17 | pub fn foo(origin: OriginFor<T>) -> DispatchResultWithPostInfo {}
|
||||
34 | pub fn foo(origin: OriginFor<T>) -> DispatchResultWithPostInfo {}
|
||||
| ^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::Hooks;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: Invalid pallet::call, must have at least origin arg
|
||||
--> $DIR/call_no_origin.rs:17:7
|
||||
--> tests/pallet_ui/call_no_origin.rs:34:7
|
||||
|
|
||||
17 | pub fn foo() {}
|
||||
34 | pub fn foo() {}
|
||||
| ^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::Hooks;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: Invalid pallet::call, require return type DispatchResultWithPostInfo
|
||||
--> $DIR/call_no_return.rs:17:7
|
||||
--> tests/pallet_ui/call_no_return.rs:34:7
|
||||
|
|
||||
17 | pub fn foo(origin: OriginFor<T>) {}
|
||||
34 | pub fn foo(origin: OriginFor<T>) {}
|
||||
| ^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::DispatchResult;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
error: invalid suffix `something` for number literal
|
||||
--> tests/pallet_ui/call_weight_argument_has_suffix.rs:15:26
|
||||
--> tests/pallet_ui/call_weight_argument_has_suffix.rs:32:26
|
||||
|
|
||||
15 | #[pallet::weight(10_000something)]
|
||||
32 | #[pallet::weight(10_000something)]
|
||||
| ^^^^^^^^^^^^^^^ invalid suffix `something`
|
||||
|
|
||||
= help: the suffix must be one of the numeric types (`u32`, `isize`, `f32`, etc.)
|
||||
@@ -12,9 +12,9 @@ error: use of deprecated constant `pallet::warnings::ConstantWeight_0::_w`:
|
||||
|
||||
For more info see:
|
||||
<https://github.com/paritytech/substrate/pull/13798>
|
||||
--> tests/pallet_ui/call_weight_argument_has_suffix.rs:15:26
|
||||
--> tests/pallet_ui/call_weight_argument_has_suffix.rs:32:26
|
||||
|
|
||||
15 | #[pallet::weight(10_000something)]
|
||||
32 | #[pallet::weight(10_000something)]
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `-D deprecated` implied by `-D warnings`
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::DispatchResult;
|
||||
|
||||
@@ -4,9 +4,9 @@ error: use of deprecated constant `pallet::warnings::ConstantWeight_0::_w`:
|
||||
|
||||
For more info see:
|
||||
<https://github.com/paritytech/substrate/pull/13798>
|
||||
--> tests/pallet_ui/call_weight_const_warning.rs:15:26
|
||||
--> tests/pallet_ui/call_weight_const_warning.rs:32:26
|
||||
|
|
||||
15 | #[pallet::weight(123_u64)]
|
||||
32 | #[pallet::weight(123_u64)]
|
||||
| ^^^^^^^
|
||||
|
|
||||
= note: `-D deprecated` implied by `-D warnings`
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::DispatchResult;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
error: invalid suffix `custom_prefix` for number literal
|
||||
--> tests/pallet_ui/call_weight_const_warning_twice.rs:19:26
|
||||
--> tests/pallet_ui/call_weight_const_warning_twice.rs:36:26
|
||||
|
|
||||
19 | #[pallet::weight(123_custom_prefix)]
|
||||
36 | #[pallet::weight(123_custom_prefix)]
|
||||
| ^^^^^^^^^^^^^^^^^ invalid suffix `custom_prefix`
|
||||
|
|
||||
= help: the suffix must be one of the numeric types (`u32`, `isize`, `f32`, etc.)
|
||||
@@ -12,9 +12,9 @@ error: use of deprecated constant `pallet::warnings::ConstantWeight_0::_w`:
|
||||
|
||||
For more info see:
|
||||
<https://github.com/paritytech/substrate/pull/13798>
|
||||
--> tests/pallet_ui/call_weight_const_warning_twice.rs:15:26
|
||||
--> tests/pallet_ui/call_weight_const_warning_twice.rs:32:26
|
||||
|
|
||||
15 | #[pallet::weight(123)]
|
||||
32 | #[pallet::weight(123)]
|
||||
| ^^^
|
||||
|
|
||||
= note: `-D deprecated` implied by `-D warnings`
|
||||
@@ -25,7 +25,7 @@ error: use of deprecated constant `pallet::warnings::ConstantWeight_1::_w`:
|
||||
|
||||
For more info see:
|
||||
<https://github.com/paritytech/substrate/pull/13798>
|
||||
--> tests/pallet_ui/call_weight_const_warning_twice.rs:19:26
|
||||
--> tests/pallet_ui/call_weight_const_warning_twice.rs:36:26
|
||||
|
|
||||
19 | #[pallet::weight(123_custom_prefix)]
|
||||
36 | #[pallet::weight(123_custom_prefix)]
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
use frame_support::pallet_prelude::*;
|
||||
|
||||
pub trait WeightInfo {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
error: expected `weight`
|
||||
--> tests/pallet_ui/call_weight_inherited_invalid.rs:19:17
|
||||
--> tests/pallet_ui/call_weight_inherited_invalid.rs:36:17
|
||||
|
|
||||
19 | #[pallet::call(invalid)]
|
||||
36 | #[pallet::call(invalid)]
|
||||
| ^^^^^^^
|
||||
|
||||
error: expected parentheses
|
||||
--> tests/pallet_ui/call_weight_inherited_invalid.rs:40:17
|
||||
--> tests/pallet_ui/call_weight_inherited_invalid.rs:57:17
|
||||
|
|
||||
40 | #[pallet::call = invalid]
|
||||
57 | #[pallet::call = invalid]
|
||||
| ^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
// Weight is an ident instead of a type.
|
||||
|
||||
use frame_support::pallet_prelude::*;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
error[E0412]: cannot find type `prefix` in this scope
|
||||
--> tests/pallet_ui/call_weight_inherited_invalid2.rs:22:24
|
||||
--> tests/pallet_ui/call_weight_inherited_invalid2.rs:39:24
|
||||
|
|
||||
22 | #[pallet::call(weight(prefix))]
|
||||
39 | #[pallet::call(weight(prefix))]
|
||||
| ^^^^^^ not found in this scope
|
||||
|
||||
error[E0412]: cannot find type `prefix` in this scope
|
||||
--> tests/pallet_ui/call_weight_inherited_invalid2.rs:43:26
|
||||
--> tests/pallet_ui/call_weight_inherited_invalid2.rs:60:26
|
||||
|
|
||||
43 | #[pallet::call(weight = prefix)]
|
||||
60 | #[pallet::call(weight = prefix)]
|
||||
| ^^^^^^ not found in this scope
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
// Call weight is an LitInt instead of a type.
|
||||
|
||||
use frame_support::pallet_prelude::*;
|
||||
|
||||
+10
-10
@@ -1,19 +1,19 @@
|
||||
error: expected one of: `for`, parentheses, `fn`, `unsafe`, `extern`, identifier, `::`, `<`, `dyn`, square brackets, `*`, `&`, `!`, `impl`, `_`, lifetime
|
||||
--> tests/pallet_ui/call_weight_inherited_invalid3.rs:22:24
|
||||
--> tests/pallet_ui/call_weight_inherited_invalid3.rs:39:24
|
||||
|
|
||||
22 | #[pallet::call(weight(123))]
|
||||
39 | #[pallet::call(weight(123))]
|
||||
| ^^^
|
||||
|
||||
error: expected one of: `for`, parentheses, `fn`, `unsafe`, `extern`, identifier, `::`, `<`, `dyn`, square brackets, `*`, `&`, `!`, `impl`, `_`, lifetime
|
||||
--> tests/pallet_ui/call_weight_inherited_invalid3.rs:43:26
|
||||
--> tests/pallet_ui/call_weight_inherited_invalid3.rs:60:26
|
||||
|
|
||||
43 | #[pallet::call(weight = 123)]
|
||||
60 | #[pallet::call(weight = 123)]
|
||||
| ^^^
|
||||
|
||||
error: unused import: `frame_system::pallet_prelude::*`
|
||||
--> tests/pallet_ui/call_weight_inherited_invalid3.rs:4:5
|
||||
|
|
||||
4 | use frame_system::pallet_prelude::*;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `-D unused-imports` implied by `-D warnings`
|
||||
--> tests/pallet_ui/call_weight_inherited_invalid3.rs:21:5
|
||||
|
|
||||
21 | use frame_system::pallet_prelude::*;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `-D unused-imports` implied by `-D warnings`
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
// Function does not exist in the trait.
|
||||
|
||||
use frame_support::pallet_prelude::*;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
error[E0599]: no function or associated item named `foo` found for associated type `<T as parentheses::Config>::WeightInfo` in the current scope
|
||||
--> tests/pallet_ui/call_weight_inherited_invalid4.rs:24:10
|
||||
--> tests/pallet_ui/call_weight_inherited_invalid4.rs:41:10
|
||||
|
|
||||
24 | pub fn foo(_: OriginFor<T>) -> DispatchResult {
|
||||
41 | pub fn foo(_: OriginFor<T>) -> DispatchResult {
|
||||
| ^^^ function or associated item not found in `<T as Config>::WeightInfo`
|
||||
|
||||
error[E0599]: no function or associated item named `foo` found for associated type `<T as assign::Config>::WeightInfo` in the current scope
|
||||
--> tests/pallet_ui/call_weight_inherited_invalid4.rs:45:10
|
||||
--> tests/pallet_ui/call_weight_inherited_invalid4.rs:62:10
|
||||
|
|
||||
45 | pub fn foo(_: OriginFor<T>) -> DispatchResult {
|
||||
62 | pub fn foo(_: OriginFor<T>) -> DispatchResult {
|
||||
| ^^^ function or associated item not found in `<T as Config>::WeightInfo`
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
// Stray tokens after good input.
|
||||
|
||||
#[frame_support::pallet]
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
error: unexpected token
|
||||
--> tests/pallet_ui/call_weight_inherited_invalid5.rs:14:50
|
||||
--> tests/pallet_ui/call_weight_inherited_invalid5.rs:31:50
|
||||
|
|
||||
14 | #[pallet::call(weight(<T as Config>::WeightInfo straycat))]
|
||||
31 | #[pallet::call(weight(<T as Config>::WeightInfo straycat))]
|
||||
| ^^^^^^^^
|
||||
|
||||
error: unexpected token
|
||||
--> tests/pallet_ui/call_weight_inherited_invalid5.rs:34:52
|
||||
--> tests/pallet_ui/call_weight_inherited_invalid5.rs:51:52
|
||||
|
|
||||
34 | #[pallet::call(weight = <T as Config>::WeightInfo straycat)]
|
||||
51 | #[pallet::call(weight = <T as Config>::WeightInfo straycat)]
|
||||
| ^^^^^^^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::*;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
error[E0369]: binary operation `!=` cannot be applied to type `NoStorageVersionSet`
|
||||
--> tests/pallet_ui/compare_unset_storage_version.rs:15:39
|
||||
--> tests/pallet_ui/compare_unset_storage_version.rs:32:39
|
||||
|
|
||||
15 | if Self::current_storage_version() != Self::on_chain_storage_version() {
|
||||
32 | if Self::current_storage_version() != Self::on_chain_storage_version() {
|
||||
| ------------------------------- ^^ -------------------------------- StorageVersion
|
||||
| |
|
||||
| NoStorageVersionSet
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
#[pallet::config]
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
error: expected one of: `FreezeReason`, `HoldReason`, `LockId`, `SlashReason`
|
||||
--> tests/pallet_ui/composite_enum_unsupported_identifier.rs:10:11
|
||||
--> tests/pallet_ui/composite_enum_unsupported_identifier.rs:27:11
|
||||
|
|
||||
10 | pub enum HoldReasons {}
|
||||
27 | pub enum HoldReasons {}
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
+17
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::*;
|
||||
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
error[E0220]: associated type `Block` not found for `Self`
|
||||
--> tests/pallet_ui/default_config_with_no_default_in_system.rs:8:31
|
||||
|
|
||||
8 | type MyGetParam2: Get<Self::Block>;
|
||||
| ^^^^^ there is a similarly named associated type `Block` in the trait `frame_system::Config`
|
||||
--> tests/pallet_ui/default_config_with_no_default_in_system.rs:25:31
|
||||
|
|
||||
25 | type MyGetParam2: Get<Self::Block>;
|
||||
| ^^^^^ there is a similarly named associated type `Block` in the trait `frame_system::Config`
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
#[pallet::config]
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
error: use of deprecated struct `pallet::_::Store`:
|
||||
Use of `#[pallet::generate_store(pub(super) trait Store)]` will be removed after July 2023.
|
||||
Check https://github.com/paritytech/substrate/pull/13535 for more details.
|
||||
--> tests/pallet_ui/deprecated_store_attr.rs:7:3
|
||||
|
|
||||
7 | #[pallet::generate_store(trait Store)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `-D deprecated` implied by `-D warnings`
|
||||
--> tests/pallet_ui/deprecated_store_attr.rs:24:3
|
||||
|
|
||||
24 | #[pallet::generate_store(trait Store)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `-D deprecated` implied by `-D warnings`
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
#[frame_support::pallet]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
error: A pallet::call requires either a concrete `#[pallet::weight($expr)]` or an
|
||||
inherited weight from the `#[pallet:call(weight($type))]` attribute, but
|
||||
none were given.
|
||||
--> tests/pallet_ui/dev_mode_without_arg.rs:22:7
|
||||
--> tests/pallet_ui/dev_mode_without_arg.rs:39:7
|
||||
|
|
||||
22 | pub fn my_call(_origin: OriginFor<T>) -> DispatchResult {
|
||||
39 | pub fn my_call(_origin: OriginFor<T>) -> DispatchResult {
|
||||
| ^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
pub use pallet::*;
|
||||
|
||||
@@ -5,9 +5,9 @@ error: use of deprecated constant `pallet::warnings::ImplicitCallIndex_0::_w`:
|
||||
For more info see:
|
||||
<https://github.com/paritytech/substrate/pull/12891>
|
||||
<https://github.com/paritytech/substrate/pull/11381>
|
||||
--> tests/pallet_ui/dev_mode_without_arg_call_index.rs:22:10
|
||||
--> tests/pallet_ui/dev_mode_without_arg_call_index.rs:39:10
|
||||
|
|
||||
22 | pub fn my_call(_origin: OriginFor<T>) -> DispatchResult {
|
||||
39 | pub fn my_call(_origin: OriginFor<T>) -> DispatchResult {
|
||||
| ^^^^^^^
|
||||
|
|
||||
= note: `-D deprecated` implied by `-D warnings`
|
||||
@@ -18,7 +18,7 @@ error: use of deprecated constant `pallet::warnings::ConstantWeight_0::_w`:
|
||||
|
||||
For more info see:
|
||||
<https://github.com/paritytech/substrate/pull/13798>
|
||||
--> tests/pallet_ui/dev_mode_without_arg_call_index.rs:21:20
|
||||
--> tests/pallet_ui/dev_mode_without_arg_call_index.rs:38:20
|
||||
|
|
||||
21 | #[pallet::weight(0)]
|
||||
38 | #[pallet::weight(0)]
|
||||
| ^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
pub use pallet::*;
|
||||
|
||||
+6
-6
@@ -1,11 +1,11 @@
|
||||
error: `_` can only be used in dev_mode. Please specify an appropriate hasher.
|
||||
--> tests/pallet_ui/dev_mode_without_arg_default_hasher.rs:21:47
|
||||
--> tests/pallet_ui/dev_mode_without_arg_default_hasher.rs:38:47
|
||||
|
|
||||
21 | type MyStorageMap<T: Config> = StorageMap<_, _, u32, u64>;
|
||||
38 | type MyStorageMap<T: Config> = StorageMap<_, _, u32, u64>;
|
||||
| ^
|
||||
|
||||
error[E0432]: unresolved import `pallet`
|
||||
--> tests/pallet_ui/dev_mode_without_arg_default_hasher.rs:3:9
|
||||
|
|
||||
3 | pub use pallet::*;
|
||||
| ^^^^^^ help: a similar path exists: `test_pallet::pallet`
|
||||
--> tests/pallet_ui/dev_mode_without_arg_default_hasher.rs:20:9
|
||||
|
|
||||
20 | pub use pallet::*;
|
||||
| ^^^^^^ help: a similar path exists: `test_pallet::pallet`
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
pub use pallet::*;
|
||||
|
||||
+6
-6
@@ -5,9 +5,9 @@ error: use of deprecated constant `pallet::warnings::ImplicitCallIndex_0::_w`:
|
||||
For more info see:
|
||||
<https://github.com/paritytech/substrate/pull/12891>
|
||||
<https://github.com/paritytech/substrate/pull/11381>
|
||||
--> tests/pallet_ui/dev_mode_without_arg_max_encoded_len.rs:25:10
|
||||
--> tests/pallet_ui/dev_mode_without_arg_max_encoded_len.rs:42:10
|
||||
|
|
||||
25 | pub fn my_call(_origin: OriginFor<T>) -> DispatchResult {
|
||||
42 | pub fn my_call(_origin: OriginFor<T>) -> DispatchResult {
|
||||
| ^^^^^^^
|
||||
|
|
||||
= note: `-D deprecated` implied by `-D warnings`
|
||||
@@ -18,15 +18,15 @@ error: use of deprecated constant `pallet::warnings::ConstantWeight_0::_w`:
|
||||
|
||||
For more info see:
|
||||
<https://github.com/paritytech/substrate/pull/13798>
|
||||
--> tests/pallet_ui/dev_mode_without_arg_max_encoded_len.rs:24:20
|
||||
--> tests/pallet_ui/dev_mode_without_arg_max_encoded_len.rs:41:20
|
||||
|
|
||||
24 | #[pallet::weight(0)]
|
||||
41 | #[pallet::weight(0)]
|
||||
| ^
|
||||
|
||||
error[E0277]: the trait bound `Vec<u8>: MaxEncodedLen` is not satisfied
|
||||
--> tests/pallet_ui/dev_mode_without_arg_max_encoded_len.rs:11:12
|
||||
--> tests/pallet_ui/dev_mode_without_arg_max_encoded_len.rs:28:12
|
||||
|
|
||||
11 | #[pallet::pallet]
|
||||
28 | #[pallet::pallet]
|
||||
| ^^^^^^ the trait `MaxEncodedLen` is not implemented for `Vec<u8>`
|
||||
|
|
||||
= help: the following other types implement trait `MaxEncodedLen`:
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::Hooks;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: Invalid duplicated attribute
|
||||
--> $DIR/duplicate_call_attr.rs:22:12
|
||||
--> tests/pallet_ui/duplicate_call_attr.rs:39:12
|
||||
|
|
||||
22 | #[pallet::call]
|
||||
39 | #[pallet::call]
|
||||
| ^^^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::*;
|
||||
|
||||
@@ -1,47 +1,47 @@
|
||||
error: Duplicate storage prefixes found for `Foo`
|
||||
--> $DIR/duplicate_storage_prefix.rs:15:29
|
||||
--> tests/pallet_ui/duplicate_storage_prefix.rs:32:29
|
||||
|
|
||||
15 | #[pallet::storage_prefix = "Foo"]
|
||||
32 | #[pallet::storage_prefix = "Foo"]
|
||||
| ^^^^^
|
||||
|
||||
error: Duplicate storage prefixes found for `Foo`
|
||||
--> $DIR/duplicate_storage_prefix.rs:12:7
|
||||
--> tests/pallet_ui/duplicate_storage_prefix.rs:29:7
|
||||
|
|
||||
12 | type Foo<T> = StorageValue<_, u8>;
|
||||
29 | type Foo<T> = StorageValue<_, u8>;
|
||||
| ^^^
|
||||
|
||||
error: Duplicate storage prefixes found for `CounterForBar`, used for counter associated to counted storage map
|
||||
--> $DIR/duplicate_storage_prefix.rs:22:7
|
||||
--> tests/pallet_ui/duplicate_storage_prefix.rs:39:7
|
||||
|
|
||||
22 | type Bar<T> = CountedStorageMap<_, Twox64Concat, u16, u16>;
|
||||
39 | type Bar<T> = CountedStorageMap<_, Twox64Concat, u16, u16>;
|
||||
| ^^^
|
||||
|
||||
error: Duplicate storage prefixes found for `CounterForBar`
|
||||
--> $DIR/duplicate_storage_prefix.rs:19:7
|
||||
--> tests/pallet_ui/duplicate_storage_prefix.rs:36:7
|
||||
|
|
||||
19 | type CounterForBar<T> = StorageValue<_, u16>;
|
||||
36 | type CounterForBar<T> = StorageValue<_, u16>;
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error[E0412]: cannot find type `_GeneratedPrefixForStorageFoo` in this scope
|
||||
--> $DIR/duplicate_storage_prefix.rs:12:7
|
||||
--> tests/pallet_ui/duplicate_storage_prefix.rs:29:7
|
||||
|
|
||||
12 | type Foo<T> = StorageValue<_, u8>;
|
||||
29 | type Foo<T> = StorageValue<_, u8>;
|
||||
| ^^^ not found in this scope
|
||||
|
||||
error[E0412]: cannot find type `_GeneratedPrefixForStorageNotFoo` in this scope
|
||||
--> $DIR/duplicate_storage_prefix.rs:16:7
|
||||
--> tests/pallet_ui/duplicate_storage_prefix.rs:33:7
|
||||
|
|
||||
16 | type NotFoo<T> = StorageValue<_, u16>;
|
||||
33 | type NotFoo<T> = StorageValue<_, u16>;
|
||||
| ^^^^^^ not found in this scope
|
||||
|
||||
error[E0412]: cannot find type `_GeneratedPrefixForStorageCounterForBar` in this scope
|
||||
--> $DIR/duplicate_storage_prefix.rs:19:7
|
||||
--> tests/pallet_ui/duplicate_storage_prefix.rs:36:7
|
||||
|
|
||||
19 | type CounterForBar<T> = StorageValue<_, u16>;
|
||||
36 | type CounterForBar<T> = StorageValue<_, u16>;
|
||||
| ^^^^^^^^^^^^^ not found in this scope
|
||||
|
||||
error[E0412]: cannot find type `_GeneratedPrefixForStorageBar` in this scope
|
||||
--> $DIR/duplicate_storage_prefix.rs:22:7
|
||||
--> tests/pallet_ui/duplicate_storage_prefix.rs:39:7
|
||||
|
|
||||
22 | type Bar<T> = CountedStorageMap<_, Twox64Concat, u16, u16>;
|
||||
39 | type Bar<T> = CountedStorageMap<_, Twox64Concat, u16, u16>;
|
||||
| ^^^ not found in this scope
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::Hooks;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: Unexpected duplicated attribute
|
||||
--> tests/pallet_ui/duplicate_store_attr.rs:12:3
|
||||
--> tests/pallet_ui/duplicate_store_attr.rs:29:3
|
||||
|
|
||||
12 | #[pallet::generate_store(trait Store)]
|
||||
29 | #[pallet::generate_store(trait Store)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
#[pallet::config]
|
||||
|
||||
+16
-16
@@ -1,17 +1,17 @@
|
||||
error[E0277]: the trait bound `MyError: PalletError` is not satisfied
|
||||
--> tests/pallet_ui/error_does_not_derive_pallet_error.rs:1:1
|
||||
|
|
||||
1 | #[frame_support::pallet]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `PalletError` is not implemented for `MyError`
|
||||
|
|
||||
= help: the following other types implement trait `PalletError`:
|
||||
()
|
||||
(TupleElement0, TupleElement1)
|
||||
(TupleElement0, TupleElement1, TupleElement2)
|
||||
(TupleElement0, TupleElement1, TupleElement2, TupleElement3)
|
||||
(TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4)
|
||||
(TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5)
|
||||
(TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6)
|
||||
(TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7)
|
||||
and 36 others
|
||||
= note: this error originates in the derive macro `frame_support::PalletError` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
--> tests/pallet_ui/error_does_not_derive_pallet_error.rs:18:1
|
||||
|
|
||||
18 | #[frame_support::pallet]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `PalletError` is not implemented for `MyError`
|
||||
|
|
||||
= help: the following other types implement trait `PalletError`:
|
||||
()
|
||||
(TupleElement0, TupleElement1)
|
||||
(TupleElement0, TupleElement1, TupleElement2)
|
||||
(TupleElement0, TupleElement1, TupleElement2, TupleElement3)
|
||||
(TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4)
|
||||
(TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5)
|
||||
(TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6)
|
||||
(TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7)
|
||||
and $N others
|
||||
= note: this error originates in the derive macro `frame_support::PalletError` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::Hooks;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: Invalid pallet::error, where clause is not allowed on pallet error item
|
||||
--> $DIR/error_where_clause.rs:19:20
|
||||
--> tests/pallet_ui/error_where_clause.rs:36:20
|
||||
|
|
||||
19 | pub enum Error<T> where u32: From<u8> {}
|
||||
36 | pub enum Error<T> where u32: From<u8> {}
|
||||
| ^^^^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::Hooks;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: Invalid pallet::error, expected item enum
|
||||
--> $DIR/error_wrong_item.rs:19:2
|
||||
--> tests/pallet_ui/error_wrong_item.rs:36:2
|
||||
|
|
||||
19 | pub struct Foo;
|
||||
36 | pub struct Foo;
|
||||
| ^^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::Hooks;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: expected `Error`
|
||||
--> $DIR/error_wrong_item_name.rs:19:11
|
||||
--> tests/pallet_ui/error_wrong_item_name.rs:36:11
|
||||
|
|
||||
19 | pub enum Foo<T> {}
|
||||
36 | pub enum Foo<T> {}
|
||||
| ^^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::{Hooks, IsType};
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
error[E0277]: the trait bound `<T as pallet::Config>::Bar: Clone` is not satisfied
|
||||
--> tests/pallet_ui/event_field_not_member.rs:23:7
|
||||
--> tests/pallet_ui/event_field_not_member.rs:40:7
|
||||
|
|
||||
23 | B { b: T::Bar },
|
||||
40 | B { b: T::Bar },
|
||||
| ^ the trait `Clone` is not implemented for `<T as pallet::Config>::Bar`
|
||||
|
||||
error[E0369]: binary operation `==` cannot be applied to type `&<T as pallet::Config>::Bar`
|
||||
--> tests/pallet_ui/event_field_not_member.rs:23:7
|
||||
--> tests/pallet_ui/event_field_not_member.rs:40:7
|
||||
|
|
||||
23 | B { b: T::Bar },
|
||||
40 | B { b: T::Bar },
|
||||
| ^
|
||||
|
||||
error[E0277]: `<T as pallet::Config>::Bar` doesn't implement `std::fmt::Debug`
|
||||
--> tests/pallet_ui/event_field_not_member.rs:23:7
|
||||
--> tests/pallet_ui/event_field_not_member.rs:40:7
|
||||
|
|
||||
23 | B { b: T::Bar },
|
||||
40 | B { b: T::Bar },
|
||||
| ^ `<T as pallet::Config>::Bar` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
|
||||
|
|
||||
= help: the trait `std::fmt::Debug` is not implemented for `<T as pallet::Config>::Bar`
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::Hooks;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
error: Invalid usage of RuntimeEvent, `Config` contains no associated type `RuntimeEvent`, but enum `Event` is declared (in use of `#[pallet::event]`). An RuntimeEvent associated type must be declare on trait `Config`.
|
||||
--> $DIR/event_not_in_trait.rs:1:1
|
||||
|
|
||||
1 | #[frame_support::pallet]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: this error originates in the attribute macro `frame_support::pallet` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
--> tests/pallet_ui/event_not_in_trait.rs:18:1
|
||||
|
|
||||
18 | #[frame_support::pallet]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: this error originates in the attribute macro `frame_support::pallet` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::Hooks;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: Invalid `type RuntimeEvent`, associated type `RuntimeEvent` is reserved and must bound: `IsType<<Self as frame_system::Config>::RuntimeEvent>`
|
||||
--> $DIR/event_type_invalid_bound.rs:9:3
|
||||
|
|
||||
9 | type RuntimeEvent;
|
||||
| ^^^^
|
||||
--> tests/pallet_ui/event_type_invalid_bound.rs:26:3
|
||||
|
|
||||
26 | type RuntimeEvent;
|
||||
| ^^^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::{Hooks, IsType};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: Invalid `type RuntimeEvent`, associated type `RuntimeEvent` is reserved and must bound: `From<Event>` or `From<Event<Self>>` or `From<Event<Self, I>>`
|
||||
--> $DIR/event_type_invalid_bound_2.rs:9:3
|
||||
|
|
||||
9 | type RuntimeEvent: IsType<<Self as frame_system::Config>::RuntimeEvent>;
|
||||
| ^^^^
|
||||
--> tests/pallet_ui/event_type_invalid_bound_2.rs:26:3
|
||||
|
|
||||
26 | type RuntimeEvent: IsType<<Self as frame_system::Config>::RuntimeEvent>;
|
||||
| ^^^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::Hooks;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: Invalid pallet::event, expected enum item
|
||||
--> $DIR/event_wrong_item.rs:19:2
|
||||
--> tests/pallet_ui/event_wrong_item.rs:36:2
|
||||
|
|
||||
19 | pub struct Foo;
|
||||
36 | pub struct Foo;
|
||||
| ^^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::Hooks;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: expected `Event`
|
||||
--> $DIR/event_wrong_item_name.rs:19:11
|
||||
--> tests/pallet_ui/event_wrong_item_name.rs:36:11
|
||||
|
|
||||
19 | pub enum Foo {}
|
||||
36 | pub enum Foo {}
|
||||
| ^^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::Hooks;
|
||||
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
error: `#[pallet::genesis_config]` and `#[pallet::genesis_build]` attributes must be either both used or both not used, instead genesis_config is unused and genesis_build is used
|
||||
--> $DIR/genesis_inconsistent_build_config.rs:2:1
|
||||
|
|
||||
2 | mod pallet {
|
||||
| ^^^
|
||||
--> tests/pallet_ui/genesis_inconsistent_build_config.rs:19:1
|
||||
|
|
||||
19 | mod pallet {
|
||||
| ^^^
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::Hooks;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
error: Invalid genesis builder: expected `GenesisBuild<T>` or `GenesisBuild<T, I>`
|
||||
--> $DIR/genesis_invalid_generic.rs:19:7
|
||||
--> tests/pallet_ui/genesis_invalid_generic.rs:36:7
|
||||
|
|
||||
19 | impl GenesisBuild for GenesisConfig {}
|
||||
36 | impl GenesisBuild for GenesisConfig {}
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
error: expected `<`
|
||||
--> $DIR/genesis_invalid_generic.rs:1:1
|
||||
|
|
||||
1 | #[frame_support::pallet]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: this error originates in the attribute macro `frame_support::pallet` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
--> tests/pallet_ui/genesis_invalid_generic.rs:18:1
|
||||
|
|
||||
18 | #[frame_support::pallet]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: this error originates in the attribute macro `frame_support::pallet` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// This file is part of Substrate.
|
||||
|
||||
// Copyright (C) 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.
|
||||
|
||||
#[frame_support::pallet]
|
||||
mod pallet {
|
||||
use frame_support::pallet_prelude::Hooks;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: Invalid pallet::genesis_build, expected impl<..> GenesisBuild<..> for GenesisConfig<..>
|
||||
--> $DIR/genesis_wrong_name.rs:19:2
|
||||
--> tests/pallet_ui/genesis_wrong_name.rs:36:2
|
||||
|
|
||||
19 | impl Foo {}
|
||||
36 | impl Foo {}
|
||||
| ^^^^
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user