Skip to content

Commit

Permalink
toolchain: 1.73.0 -> 1.74.0 (#10188)
Browse files Browse the repository at this point in the history
I think discussion is warranted on whether we want to use the lint
inheritance. The previous way was definitely quite a bit more terse, but
it was also much less composable (e.g. it was less straightforward to
exclude or include a specific crate from a specific lint)
  • Loading branch information
nagisa authored Nov 17, 2023
1 parent cac2d74 commit 2534fdb
Show file tree
Hide file tree
Showing 90 changed files with 291 additions and 17 deletions.
14 changes: 13 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
version = "0.0.0" # managed by cargo-workspaces, see below
authors = ["Near Inc <[email protected]>"]
edition = "2021"
rust-version = "1.73.0"
rust-version = "1.74.0"
repository = "https://github.com/near/nearcore"
license = "MIT OR Apache-2.0"

Expand Down Expand Up @@ -88,6 +88,18 @@ members = [
"utils/stdx",
]

[workspace.lints.rust]
warnings = "deny"

[workspace.lints.clippy]
all = { level = "allow", priority = -1 }
clone_on_copy = "deny"
correctness = "deny"
derivable_impls = "deny"
redundant_clone = "deny"
suspicious = "deny"
len_zero = "deny"

[workspace.dependencies]
actix = "0.13.0"
actix-cors = "0.6.1"
Expand Down
3 changes: 2 additions & 1 deletion chain/chain-primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ repository.workspace = true
license.workspace = true
publish = true

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lints]
workspace = true

[dependencies]
chrono.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions chain/chain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ authors.workspace = true
edition.workspace = true
publish = false

[lints]
workspace = true

[dependencies]
actix.workspace = true
ansi_term.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions chain/chunks-primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
license.workspace = true
publish = true

[lints]
workspace = true

[dependencies]
near-chain-primitives.workspace = true
near-primitives.workspace = true
3 changes: 3 additions & 0 deletions chain/chunks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ repository.workspace = true
license.workspace = true
publish = false

[lints]
workspace = true

[dependencies]
actix.workspace = true
borsh.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions chain/client-primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
license.workspace = true
publish = true

[lints]
workspace = true

[dependencies]
actix.workspace = true
ansi_term.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions chain/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ repository.workspace = true
license.workspace = true
publish = false

[lints]
workspace = true

[dependencies]
actix-rt.workspace = true
actix.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions chain/epoch-manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ repository.workspace = true
license.workspace = true
publish = false

[lints]
workspace = true

[dependencies]
borsh.workspace = true
chrono = { workspace = true, optional = true }
Expand Down
3 changes: 2 additions & 1 deletion chain/indexer-primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ repository.workspace = true
license.workspace = true
publish = true

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lints]
workspace = true

[dependencies]
serde.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions chain/indexer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ repository.workspace = true
license.workspace = true
publish = false

[lints]
workspace = true

[dependencies]
actix.workspace = true
anyhow.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions chain/jsonrpc-adversarial-primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ repository.workspace = true
license.workspace = true
publish = false

[lints]
workspace = true

[dependencies]
serde.workspace = true

Expand Down
3 changes: 3 additions & 0 deletions chain/jsonrpc-primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
license.workspace = true
publish = true

[lints]
workspace = true

[dependencies]
arbitrary.workspace = true
serde.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions chain/jsonrpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ repository.workspace = true
license.workspace = true
publish = false

[lints]
workspace = true

[dependencies]
actix-cors.workspace = true
actix-web.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions chain/jsonrpc/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ repository.workspace = true
license.workspace = true
publish = false

[lints]
workspace = true

[dependencies]
actix-http.workspace = true
awc.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions chain/jsonrpc/fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ repository.workspace = true
license.workspace = true
publish = false

[lints]
workspace = true

[package.metadata]
cargo-fuzz = true

Expand Down
3 changes: 3 additions & 0 deletions chain/jsonrpc/jsonrpc-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ repository.workspace = true
license.workspace = true
publish = false

[lints]
workspace = true

[dependencies]
actix.workspace = true
awc.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions chain/network/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ repository.workspace = true
license.workspace = true
publish = false

[lints]
workspace = true

[build-dependencies]
anyhow.workspace = true
protobuf-codegen.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions chain/pool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ repository.workspace = true
license.workspace = true
publish = false

[lints]
workspace = true

[dependencies]
borsh.workspace = true
once_cell.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions chain/rosetta-rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ repository.workspace = true
license.workspace = true
publish = false

[lints]
workspace = true

[dependencies]
actix-cors.workspace = true
actix-http.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions chain/telemetry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ repository.workspace = true
license.workspace = true
publish = false

[lints]
workspace = true

[dependencies]
actix.workspace = true
awc.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions core/async/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
license.workspace = true
publish = false

[lints]
workspace = true

[dependencies]
actix.workspace = true
derive-enum-from-into.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions core/chain-configs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
license.workspace = true
publish = true

[lints]
workspace = true

[dependencies]
anyhow.workspace = true
bytesize.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions core/crypto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
license.workspace = true
publish = true

[lints]
workspace = true

[dependencies]
blake2.workspace = true
borsh.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions core/dyn-configs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
license.workspace = true
publish = true

[lints]
workspace = true

[dependencies]
anyhow.workspace = true
once_cell.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions core/o11y/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
license.workspace = true
publish = true

[lints]
workspace = true

[dependencies]
near-crypto.workspace = true
near-fmt.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions core/primitives-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
license.workspace = true
publish = true

[lints]
workspace = true

[dependencies]
arbitrary.workspace = true
base64.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions core/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
license.workspace = true
publish = true

[lints]
workspace = true

[dependencies]
arbitrary.workspace = true
base64.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions core/store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ repository.workspace = true
license.workspace = true
publish = false

[lints]
workspace = true

[dependencies]
actix-rt.workspace = true
actix.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions genesis-tools/genesis-csv-to-json/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ repository.workspace = true
license.workspace = true
publish = false

[lints]
workspace = true

[dependencies]
chrono.workspace = true
clap.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions genesis-tools/genesis-populate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ repository.workspace = true
license.workspace = true
publish = false

[lints]
workspace = true

[dependencies]
borsh.workspace = true
clap.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions genesis-tools/keypair-generator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ repository.workspace = true
license.workspace = true
publish = false

[lints]
workspace = true

[dependencies]
clap.workspace = true

Expand Down
3 changes: 3 additions & 0 deletions integration-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ repository.workspace = true
license.workspace = true
publish = false

[lints]
workspace = true

[dependencies]
actix-rt.workspace = true
actix.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions integration-tests/src/tests/client/sync_state_nodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,9 @@ fn sync_empty_state() {

#[test]
#[cfg_attr(not(feature = "expensive_tests"), ignore)]
// FIXME(#9650): locks should not be held across await points, allowed currently only because the
// lint started triggering during a toolchain bump.
#[allow(clippy::await_holding_lock)]
/// Runs one node for some time, which dumps state to a temp directory.
/// Start the second node which gets state parts from that temp directory.
fn sync_state_dump() {
Expand Down
3 changes: 3 additions & 0 deletions nearcore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ repository.workspace = true
license.workspace = true
publish = false

[lints]
workspace = true

[dependencies]
actix-rt.workspace = true
actix-web.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions neard/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ repository.workspace = true
license.workspace = true
publish = false

[lints]
workspace = true

[[bin]]
path = "src/main.rs"
name = "neard"
Expand Down
3 changes: 3 additions & 0 deletions pytest/tests/loadtest/contract/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ version = "0.1.0"
authors = ["Near Inc <[email protected]>"]
edition = "2018"

[lints]
workspace = true

[workspace]
members = []

Expand Down
3 changes: 3 additions & 0 deletions runtime/near-test-contracts/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
license.workspace = true
publish = false

[lints]
workspace = true

[dependencies]
once_cell.workspace = true
wat.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions runtime/near-vm-runner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ license.workspace = true
categories = ["wasm"]
publish = true

[lints]
workspace = true

[dependencies]
anyhow = { workspace = true, optional = true }
base64.workspace = true
Expand Down
Loading

0 comments on commit 2534fdb

Please sign in to comment.