Fix Rust beta compiler errors 1.78.0-beta.1 (#5439)

* remove redundant imports

* fix test

* contains key

* fmt

* Merge branch 'unstable' into fix-beta-compiler
This commit is contained in:
Eitan Seri-Levi
2024-03-20 07:17:02 +02:00
committed by GitHub
parent 4449627c7c
commit 01ec42e75a
148 changed files with 104 additions and 301 deletions

View File

@@ -3,7 +3,6 @@ use crate::case_result::compare_result;
use crate::impl_bls_load_case;
use bls::{AggregateSignature, PublicKeyBytes};
use serde::Deserialize;
use std::convert::TryInto;
use types::Hash256;
#[derive(Debug, Clone, Deserialize)]

View File

@@ -3,7 +3,6 @@ use crate::case_result::compare_result;
use crate::impl_bls_load_case;
use bls::{AggregateSignature, PublicKeyBytes};
use serde::Deserialize;
use std::convert::TryInto;
use types::Hash256;
#[derive(Debug, Clone, Deserialize)]

View File

@@ -3,7 +3,6 @@ use crate::case_result::compare_result;
use crate::impl_bls_load_case;
use bls::{PublicKeyBytes, Signature, SignatureBytes};
use serde::Deserialize;
use std::convert::TryInto;
use types::Hash256;
#[derive(Debug, Clone, Deserialize)]

View File

@@ -1,7 +1,6 @@
use serde::Deserialize;
use ssz::Encode;
use ssz_derive::{Decode, Encode};
use std::convert::TryFrom;
use std::fmt::Debug;
use tree_hash::TreeHash;
use types::ForkName;

View File

@@ -3,7 +3,6 @@ use crate::bls_setting::BlsSetting;
use crate::case_result::compare_beacon_state_results_without_caches;
use crate::decode::{ssz_decode_state, yaml_decode_file};
use crate::type_name;
use crate::type_name::TypeName;
use serde::Deserialize;
use state_processing::per_epoch_processing::capella::process_historical_summaries_update;
use state_processing::per_epoch_processing::effective_balance_updates::process_effective_balance_updates;
@@ -15,8 +14,7 @@ use state_processing::per_epoch_processing::{
};
use state_processing::EpochProcessingError;
use std::marker::PhantomData;
use std::path::{Path, PathBuf};
use types::{BeaconState, ChainSpec, EthSpec, ForkName};
use types::BeaconState;
#[derive(Debug, Clone, Default, Deserialize)]
pub struct Metadata {

View File

@@ -6,7 +6,7 @@ use serde::Deserialize;
use state_processing::upgrade::{
upgrade_to_altair, upgrade_to_bellatrix, upgrade_to_capella, upgrade_to_deneb,
};
use types::{BeaconState, ForkName};
use types::BeaconState;
#[derive(Debug, Clone, Default, Deserialize)]
pub struct Metadata {

View File

@@ -24,8 +24,8 @@ use std::sync::Arc;
use std::time::Duration;
use types::{
Attestation, AttesterSlashing, BeaconBlock, BeaconState, BlobSidecar, BlobsList, Checkpoint,
EthSpec, ExecutionBlockHash, ForkName, Hash256, IndexedAttestation, KzgProof,
ProgressiveBalancesMode, ProposerPreparationData, SignedBeaconBlock, Slot, Uint256,
ExecutionBlockHash, Hash256, IndexedAttestation, KzgProof, ProgressiveBalancesMode,
ProposerPreparationData, SignedBeaconBlock, Slot, Uint256,
};
#[derive(Default, Debug, PartialEq, Clone, Deserialize, Decode)]

View File

@@ -3,8 +3,7 @@ use crate::case_result::compare_beacon_state_results_without_caches;
use crate::decode::{ssz_decode_file, ssz_decode_file_with, ssz_decode_state, yaml_decode_file};
use serde::Deserialize;
use state_processing::initialize_beacon_state_from_eth1;
use std::path::PathBuf;
use types::{BeaconState, Deposit, EthSpec, ExecutionPayloadHeader, ForkName, Hash256};
use types::{BeaconState, Deposit, ExecutionPayloadHeader, Hash256};
#[derive(Debug, Clone, Deserialize)]
struct Metadata {

View File

@@ -2,8 +2,7 @@ use super::*;
use crate::decode::{ssz_decode_state, yaml_decode_file};
use serde::Deserialize;
use state_processing::is_valid_genesis_state;
use std::path::Path;
use types::{BeaconState, EthSpec, ForkName};
use types::BeaconState;
#[derive(Debug, Clone, Deserialize)]
pub struct Metadata {

View File

@@ -4,7 +4,6 @@ use beacon_chain::kzg_utils::validate_blob;
use eth2_network_config::TRUSTED_SETUP_BYTES;
use kzg::{Error as KzgError, Kzg, KzgCommitment, KzgProof, TrustedSetup};
use serde::Deserialize;
use std::convert::TryInto;
use std::marker::PhantomData;
use types::Blob;

View File

@@ -1,9 +1,8 @@
use super::*;
use crate::decode::{ssz_decode_file, ssz_decode_state, yaml_decode_file};
use serde::Deserialize;
use std::path::Path;
use tree_hash::Hash256;
use types::{BeaconBlockBody, BeaconBlockBodyDeneb, BeaconState, EthSpec, ForkName};
use types::{BeaconBlockBody, BeaconBlockBodyDeneb, BeaconState};
#[derive(Debug, Clone, Deserialize)]
pub struct Metadata {

View File

@@ -2,7 +2,6 @@ use super::*;
use crate::bls_setting::BlsSetting;
use crate::case_result::compare_beacon_state_results_without_caches;
use crate::decode::{ssz_decode_file, ssz_decode_file_with, ssz_decode_state, yaml_decode_file};
use crate::testing_spec;
use serde::Deserialize;
use ssz::Decode;
use state_processing::common::update_progressive_balances_cache::initialize_progressive_balances_cache;
@@ -19,11 +18,10 @@ use state_processing::{
ConsensusContext,
};
use std::fmt::Debug;
use std::path::Path;
use types::{
Attestation, AttesterSlashing, BeaconBlock, BeaconBlockBody, BeaconBlockBodyCapella,
BeaconBlockBodyDeneb, BeaconBlockBodyMerge, BeaconState, BlindedPayload, ChainSpec, Deposit,
EthSpec, ExecutionPayload, ForkName, FullPayload, ProposerSlashing, SignedBlsToExecutionChange,
BeaconBlockBodyDeneb, BeaconBlockBodyMerge, BeaconState, BlindedPayload, Deposit,
ExecutionPayload, FullPayload, ProposerSlashing, SignedBlsToExecutionChange,
SignedVoluntaryExit, SyncAggregate,
};

View File

@@ -13,10 +13,9 @@ use state_processing::{
},
EpochProcessingError,
};
use std::path::{Path, PathBuf};
use types::{
consts::altair::{TIMELY_HEAD_FLAG_INDEX, TIMELY_SOURCE_FLAG_INDEX, TIMELY_TARGET_FLAG_INDEX},
BeaconState, EthSpec, ForkName,
BeaconState,
};
#[derive(Debug, Clone, PartialEq, Decode, Encode, CompareFields)]

View File

@@ -7,7 +7,7 @@ use state_processing::{
per_block_processing, per_slot_processing, BlockProcessingError, BlockSignatureStrategy,
ConsensusContext, StateProcessingStrategy, VerifyBlockRoot,
};
use types::{BeaconState, EthSpec, ForkName, RelativeEpoch, SignedBeaconBlock};
use types::{BeaconState, RelativeEpoch, SignedBeaconBlock};
#[derive(Debug, Clone, Deserialize)]
pub struct Metadata {

View File

@@ -4,7 +4,7 @@ use crate::case_result::compare_beacon_state_results_without_caches;
use crate::decode::{ssz_decode_state, yaml_decode_file};
use serde::Deserialize;
use state_processing::per_slot_processing;
use types::{BeaconState, EthSpec, ForkName};
use types::BeaconState;
#[derive(Debug, Clone, Default, Deserialize)]
pub struct Metadata {

View File

@@ -4,7 +4,6 @@ use crate::decode::yaml_decode_file;
use serde::Deserialize;
use std::marker::PhantomData;
use swap_or_not_shuffle::{compute_shuffled_index, shuffle_list};
use types::ForkName;
#[derive(Debug, Clone, Deserialize)]
pub struct Shuffling<T> {

View File

@@ -1,16 +1,14 @@
#![allow(non_snake_case)]
use super::*;
use crate::cases::common::{SszStaticType, TestU128, TestU256};
use crate::cases::ssz_static::{check_serialization, check_tree_hash};
use crate::cases::common::{TestU128, TestU256};
use crate::decode::{snappy_decode_file, yaml_decode_file};
use serde::Deserialize;
use serde::{de::Error as SerdeError, Deserializer};
use ssz_derive::{Decode, Encode};
use std::path::{Path, PathBuf};
use tree_hash_derive::TreeHash;
use types::typenum::*;
use types::{BitList, BitVector, FixedVector, ForkName, VariableList};
use types::{BitList, BitVector, FixedVector, VariableList};
#[derive(Debug, Clone, Deserialize)]
struct Metadata {

View File

@@ -1,11 +1,10 @@
use super::*;
use crate::case_result::compare_result;
use crate::cases::common::SszStaticType;
use crate::decode::{snappy_decode_file, yaml_decode_file};
use serde::Deserialize;
use ssz::Decode;
use tree_hash::TreeHash;
use types::{BeaconBlock, BeaconState, ForkName, Hash256, SignedBeaconBlock};
use types::{BeaconBlock, BeaconState, Hash256, SignedBeaconBlock};
#[derive(Debug, Clone, Deserialize)]
struct SszStaticRoots {

View File

@@ -7,7 +7,7 @@ use state_processing::{
ConsensusContext, StateProcessingStrategy, VerifyBlockRoot,
};
use std::str::FromStr;
use types::{BeaconState, Epoch, ForkName, SignedBeaconBlock};
use types::{BeaconState, Epoch, SignedBeaconBlock};
#[derive(Debug, Clone, Deserialize)]
pub struct Metadata {

View File

@@ -5,7 +5,7 @@ use std::fs::{self};
use std::io::Write;
use std::path::Path;
use std::path::PathBuf;
use types::{BeaconState, EthSpec};
use types::BeaconState;
/// See `log_file_access` for details.
const ACCESSED_FILE_LOG_FILENAME: &str = ".accessed_file_log.txt";