Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit ce36080

Browse files
committed
Allow deprecated in tests
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
1 parent 1cb3433 commit ce36080

19 files changed

Lines changed: 63 additions & 0 deletions

frame/support/src/dispatch.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3206,6 +3206,8 @@ macro_rules! __check_reserved_fn_name {
32063206
// Do not complain about unused `dispatch` and `dispatch_aux`.
32073207
#[allow(dead_code)]
32083208
mod tests {
3209+
#![allow(deprecated)]
3210+
32093211
use super::*;
32103212
use crate::{
32113213
dispatch::{DispatchClass, DispatchInfo, Pays},
@@ -3542,6 +3544,8 @@ mod tests {
35423544
// Do not complain about unused `dispatch` and `dispatch_aux`.
35433545
#[allow(dead_code)]
35443546
mod weight_tests {
3547+
#![allow(deprecated)]
3548+
35453549
use super::*;
35463550
use sp_core::{parameter_types, Get};
35473551
use sp_weights::RuntimeDbWeight;

frame/support/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -826,6 +826,8 @@ pub use serde::{Deserialize, Serialize};
826826

827827
#[cfg(test)]
828828
pub mod tests {
829+
#![allow(deprecated)]
830+
829831
use super::*;
830832
use crate::metadata_ir::{
831833
PalletStorageMetadataIR, StorageEntryMetadataIR, StorageEntryModifierIR,

frame/support/src/storage/generator/double_map.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,8 @@ where
512512
/// Test iterators for StorageDoubleMap
513513
#[cfg(test)]
514514
mod test_iterators {
515+
#![allow(deprecated)]
516+
515517
use crate::{
516518
hash::StorageHasher,
517519
storage::{generator::StorageDoubleMap, unhashed, IterableStorageDoubleMap},

frame/support/src/storage/generator/map.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,8 @@ impl<K: FullEncode, V: FullCodec, G: StorageMap<K, V>> storage::StorageMap<K, V>
347347
/// Test iterators for StorageMap
348348
#[cfg(test)]
349349
mod test_iterators {
350+
#![allow(deprecated)]
351+
350352
use crate::{
351353
hash::StorageHasher,
352354
storage::{generator::StorageMap, unhashed, IterableStorageMap},

frame/support/src/storage/generator/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ pub use value::StorageValue;
3737
#[cfg(test)]
3838
#[allow(dead_code)]
3939
mod tests {
40+
#![allow(deprecated)]
41+
4042
use crate::{
4143
assert_noop, assert_ok,
4244
storage::{generator::StorageValue, unhashed, IterableStorageMap},

frame/support/src/storage/generator/nmap.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,8 @@ impl<K: ReversibleKeyGenerator, V: FullCodec, G: StorageNMap<K, V>>
460460
/// Test iterators for StorageNMap
461461
#[cfg(test)]
462462
mod test_iterators {
463+
#![allow(deprecated)]
464+
463465
use crate::{
464466
hash::StorageHasher,
465467
storage::{generator::StorageNMap, unhashed, IterableStorageNMap},

frame/support/test/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
// Make sure we fail compilation on warnings
2222
#![warn(missing_docs)]
2323
#![deny(warnings)]
24+
#![allow(deprecated)]
2425

2526
/// The configuration trait
2627
pub trait Config: 'static {

frame/support/test/tests/construct_runtime.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
//! * integrity test is generated
2121
2222
#![recursion_limit = "128"]
23+
#![allow(deprecated)]
2324

2425
use codec::MaxEncodedLen;
2526
use frame_support::{parameter_types, traits::PalletInfo as _};
@@ -40,6 +41,8 @@ parameter_types! {
4041
}
4142

4243
mod module1 {
44+
#![allow(deprecated)]
45+
4346
use super::*;
4447

4548
pub trait Config<I>: system::Config {}
@@ -80,6 +83,8 @@ mod module1 {
8083
}
8184

8285
mod module2 {
86+
#![allow(deprecated)]
87+
8388
use super::*;
8489

8590
pub trait Config: system::Config {}
@@ -125,6 +130,8 @@ mod nested {
125130
use super::*;
126131

127132
pub mod module3 {
133+
#![allow(deprecated)]
134+
128135
use super::*;
129136

130137
pub trait Config: system::Config {}
@@ -171,6 +178,8 @@ mod nested {
171178
}
172179

173180
pub mod module3 {
181+
#![allow(deprecated)]
182+
174183
use super::*;
175184

176185
pub trait Config: system::Config {}

frame/support/test/tests/decl_storage.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
// Do not complain about unused `dispatch` and `dispatch_aux`.
2020
#[allow(dead_code)]
2121
mod tests {
22+
#![allow(deprecated)]
23+
2224
use frame_support::metadata_ir::*;
2325
use sp_io::TestExternalities;
2426

@@ -617,6 +619,8 @@ mod tests {
617619
#[cfg(test)]
618620
#[allow(dead_code)]
619621
mod test2 {
622+
#![allow(deprecated)]
623+
620624
pub trait Config: frame_support_test::Config {}
621625

622626
frame_support::decl_module! {
@@ -695,6 +699,8 @@ mod test2 {
695699
#[cfg(test)]
696700
#[allow(dead_code)]
697701
mod test3 {
702+
#![allow(deprecated)]
703+
698704
pub trait Config: frame_support_test::Config {}
699705

700706
frame_support::decl_module! {
@@ -723,6 +729,8 @@ mod test3 {
723729
#[cfg(test)]
724730
#[allow(dead_code)]
725731
mod test_append_and_len {
732+
#![allow(deprecated)]
733+
726734
use codec::{Decode, Encode};
727735
use sp_io::TestExternalities;
728736

frame/support/test/tests/final_keys.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ use sp_io::{
2525
};
2626

2727
mod no_instance {
28+
#![allow(deprecated)]
29+
2830
pub trait Config: frame_support_test::Config {}
2931

3032
frame_support::decl_module! {
@@ -49,6 +51,8 @@ mod no_instance {
4951
}
5052

5153
mod instance {
54+
#![allow(deprecated)]
55+
5256
pub trait Config<I = DefaultInstance>: frame_support_test::Config {}
5357

5458
frame_support::decl_module! {

0 commit comments

Comments
 (0)