Skip to content

Commit f8676f1

Browse files
Update Rust toolchain to 1.78.0
Cargo.lock was updated to version 4 manually. All Git refs in our Cargo.lock appear to be encoded correctly. See: - rust-lang/cargo#12280 - rust-lang/cargo#12852 The clippy::incompatible_msrv lint may be useful in the future. We currently do not specify rust-version in Cargo.toml. Our libraries are not designed to be used outside Grandine. rust-toolchain.toml makes rust-version redundant for builds inside this repository. See: - https://doc.rust-lang.org/1.78.0/cargo/reference/manifest.html#the-rust-version-field - https://rust-lang.github.io/rust-clippy/rust-1.78.0/#/incompatible_msrv The clippy::lint_groups_priority lint produces false positives: - rust-lang/cargo#12918 (comment) - rust-lang/rust-clippy#12270 Luckily, lints inherited from a workspace do not trigger it. The issue appears to be fixed in rust-lang/rust-clippy#12827. The reason public functions trigger clippy::single_call_fn is actually our setting of avoid-breaking-exported-api. We assumed it was a bug.
1 parent dc8be59 commit f8676f1

File tree

14 files changed

+31
-16
lines changed

14 files changed

+31
-16
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ let_underscore_drop = 'warn'
8888
macro_use_extern_crate = 'warn'
8989
meta_variable_misuse = 'warn'
9090
non_ascii_idents = 'warn'
91+
non_local_definitions = 'warn'
9192
trivial_casts = 'warn'
9293
trivial_numeric_casts = 'warn'
9394
unit_bindings = 'warn'
@@ -140,7 +141,7 @@ wildcard_dependencies = 'warn'
140141
#
141142
# - `clippy::single_call_fn`.
142143
# It's unidiomatic and conflicts with lints like `clippy::too_many_lines`.
143-
# Public functions are not exempt from it as of Rust 1.77.2.
144+
# Public functions are not exempt from it if `avoid-breaking-exported-api` is `false`.
144145
#
145146
# - `clippy::std_instead_of_alloc`
146147
# It would require adding `extern crate alloc;` everywhere.

benches/benches/hashing.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ fn main() {
8989
criterion.final_summary();
9090
}
9191

92-
// Arrays of arbitrary length do not implement `Default` as of Rust 1.77.2.
92+
// Arrays of arbitrary length do not implement `Default` as of Rust 1.78.0.
9393
// See <https://github.com/rust-lang/rust/issues/61415>.
9494
// We work around that by using `PublicKeyBytes` and `SignatureBytes` instead.
9595

clippy.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
avoid-breaking-exported-api = false
22
doc-valid-idents = [
3+
'..',
34
'Eth1Data',
45
'PoS',
56
'PoW',
67
'RocksDB',
8+
'UPnP',
9+
'Web3Signer',
710
]
811
# There appears to be no way to disallow an entire module.
912
# There is an issue for it at <https://github.com/rust-lang/rust-clippy/issues/9489>.

fork_choice_control/src/mutator.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ where
342342
.blob_kzg_commitments()
343343
.iter()
344344
.copied()
345-
.map(helper_functions::misc::kzg_commitment_to_versioned_hash)
345+
.map(misc::kzg_commitment_to_versioned_hash)
346346
.collect();
347347

348348
params = Some(ExecutionPayloadParams::Deneb {
@@ -2007,7 +2007,7 @@ where
20072007

20082008
let mut gossip_ids = vec![];
20092009

2010-
// Use `drain_filter_polyfill` because `Vec::extract_if` is not stable as of Rust 1.77.2.
2010+
// Use `drain_filter_polyfill` because `Vec::extract_if` is not stable as of Rust 1.78.0.
20112011
self.delayed_until_block.retain(|_, delayed| {
20122012
let Delayed {
20132013
blocks,
@@ -2081,7 +2081,7 @@ where
20812081

20822082
let mut gossip_ids = vec![];
20832083

2084-
// Use `HashMap::retain` because `HashMap::extract_if` is not stable as of Rust 1.77.2.
2084+
// Use `HashMap::retain` because `HashMap::extract_if` is not stable as of Rust 1.78.0.
20852085
self.waiting_for_checkpoint_states
20862086
.retain(|target, waiting| {
20872087
let prune = target.epoch < finalized_epoch;

grandine/src/grandine_args.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Adding backquotes to doc comments affects `--help` output.
2+
// `clap` derive macros preserve backquotes even if `verbatim_doc_comment` is disabled.
3+
#![allow(clippy::doc_markdown)]
4+
15
use core::{
26
fmt::Display,
37
net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr},

http_api/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ impl Error {
158158
self.sources().format(": ")
159159
}
160160

161-
// `StdError::sources` is not stable as of Rust 1.77.2.
161+
// `StdError::sources` is not stable as of Rust 1.78.0.
162162
fn sources(&self) -> impl Iterator<Item = &dyn StdError> {
163163
let mut error: Option<&dyn StdError> = Some(self);
164164

http_api_utils/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ impl Error {
3737
self.sources().format(": ")
3838
}
3939

40-
// `StdError::sources` is not stable as of Rust 1.77.2.
40+
// `StdError::sources` is not stable as of Rust 1.78.0.
4141
fn sources(&self) -> impl Iterator<Item = &dyn StdError> {
4242
let mut error: Option<&dyn StdError> = Some(self);
4343

p2p/src/network.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use eth2_libp2p::{
2424
};
2525
use fork_choice_control::P2pMessage;
2626
use futures::{
27-
channel::mpsc::{self, Receiver, UnboundedReceiver, UnboundedSender},
27+
channel::mpsc::{Receiver, UnboundedReceiver, UnboundedSender},
2828
future::FutureExt as _,
2929
select,
3030
stream::StreamExt as _,
@@ -174,8 +174,8 @@ impl<P: Preset> Network<P> {
174174
}
175175
}
176176

177-
let (network_to_service_tx, network_to_service_rx) = mpsc::unbounded();
178-
let (service_to_network_tx, service_to_network_rx) = mpsc::unbounded();
177+
let (network_to_service_tx, network_to_service_rx) = futures::channel::mpsc::unbounded();
178+
let (service_to_network_tx, service_to_network_rx) = futures::channel::mpsc::unbounded();
179179

180180
run_network_service(service, network_to_service_rx, service_to_network_tx);
181181

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[toolchain]
2-
channel = 'stable-2024-04-09'
2+
channel = 'stable-2024-05-02'
33
profile = 'minimal'
44
components = ['clippy', 'rustfmt']

0 commit comments

Comments
 (0)