round two preliminaries for bumping nightly to 2023-08-25 (#33064)

* work around nightly ICE

seems to be something related to `const ref`s in generic contexts...

* allow lint false-positive on ignored trait bounds
This commit is contained in:
Trent Nelson 2023-08-30 13:46:20 -06:00 committed by GitHub
parent 79c02c8fd6
commit b13589b588
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 13 deletions

1
Cargo.lock generated
View File

@ -6040,6 +6040,7 @@ dependencies = [
"rand_chacha 0.3.1",
"rayon",
"rustc_version 0.4.0",
"rustversion",
"serde",
"serde_bytes",
"serde_derive",

View File

@ -1004,7 +1004,8 @@ pub fn keypair_from_path(
keypair_name: &str,
confirm_pubkey: bool,
) -> Result<Keypair, Box<dyn error::Error>> {
let keypair = encodable_key_from_path(matches, path, keypair_name)?;
let skip_validation = matches.is_present(SKIP_SEED_PHRASE_VALIDATION_ARG.name);
let keypair = encodable_key_from_path(path, keypair_name, skip_validation)?;
if confirm_pubkey {
confirm_encodable_keypair_pubkey(&keypair, "pubkey");
}
@ -1051,7 +1052,8 @@ pub fn elgamal_keypair_from_path(
elgamal_keypair_name: &str,
confirm_pubkey: bool,
) -> Result<ElGamalKeypair, Box<dyn error::Error>> {
let elgamal_keypair = encodable_key_from_path(matches, path, elgamal_keypair_name)?;
let skip_validation = matches.is_present(SKIP_SEED_PHRASE_VALIDATION_ARG.name);
let elgamal_keypair = encodable_key_from_path(path, elgamal_keypair_name, skip_validation)?;
if confirm_pubkey {
confirm_encodable_keypair_pubkey(&elgamal_keypair, "ElGamal pubkey");
}
@ -1105,13 +1107,14 @@ pub fn ae_key_from_path(
path: &str,
key_name: &str,
) -> Result<AeKey, Box<dyn error::Error>> {
encodable_key_from_path(matches, path, key_name)
let skip_validation = matches.is_present(SKIP_SEED_PHRASE_VALIDATION_ARG.name);
encodable_key_from_path(path, key_name, skip_validation)
}
fn encodable_key_from_path<K: EncodableKey + SeedDerivable>(
matches: &ArgMatches,
path: &str,
keypair_name: &str,
skip_validation: bool,
) -> Result<K, Box<dyn error::Error>> {
let SignerSource {
kind,
@ -1119,15 +1122,12 @@ fn encodable_key_from_path<K: EncodableKey + SeedDerivable>(
legacy,
} = parse_signer_source(path)?;
match kind {
SignerSourceKind::Prompt => {
let skip_validation = matches.is_present(SKIP_SEED_PHRASE_VALIDATION_ARG.name);
Ok(encodable_key_from_seed_phrase(
keypair_name,
skip_validation,
derivation_path,
legacy,
)?)
}
SignerSourceKind::Prompt => Ok(encodable_key_from_seed_phrase(
keypair_name,
skip_validation,
derivation_path,
legacy,
)?),
SignerSourceKind::Filepath(path) => match K::read_from_file(&path) {
Err(e) => Err(std::io::Error::new(
std::io::ErrorKind::Other,

View File

@ -24,6 +24,7 @@ num-traits = { workspace = true }
rand = { workspace = true }
rand_chacha = { workspace = true }
rayon = { workspace = true }
rustversion = { workspace = true }
serde = { workspace = true }
serde_bytes = { workspace = true }
serde_derive = { workspace = true }

View File

@ -1972,6 +1972,10 @@ impl ClusterInfo {
// Returns a predicate checking if the pull request is from a valid
// address, and if the address have responded to a ping request. Also
// appends ping packets for the addresses which need to be (re)verified.
//
// allow lint false positive trait bound requirement (`CryptoRng` only
// implemented on `&'a mut T`
#[rustversion::attr(since(1.73), allow(clippy::needless_pass_by_ref_mut))]
fn check_pull_request<'a, R>(
&'a self,
now: Instant,

View File

@ -5030,6 +5030,7 @@ dependencies = [
"rand_chacha 0.3.1",
"rayon",
"rustc_version",
"rustversion",
"serde",
"serde_bytes",
"serde_derive",