diff --git a/Cargo.lock b/Cargo.lock index 0b209415ad..f3d5ddce4b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1552,9 +1552,12 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.8" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", +] [[package]] name = "derive_more" @@ -3906,6 +3909,12 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-derive" version = "0.3.3" @@ -4354,6 +4363,12 @@ dependencies = [ "pnet_sys", ] +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "pprof" version = "0.13.0" @@ -5756,14 +5771,16 @@ dependencies = [ [[package]] name = "time" -version = "0.3.25" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fdd63d58b18d663fbdf70e049f00a22c8e42be082203be7f26589213cd75ea" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", "libc", + "num-conv", "num_threads", + "powerfmt", "serde", "time-core", "time-macros", @@ -5771,16 +5788,17 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.11" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb71511c991639bb078fd5bf97757e03914361c48100d52878b8e52b46fb92cd" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ + "num-conv", "time-core", ] diff --git a/Makefile b/Makefile index db90778235..907b328626 100644 --- a/Makefile +++ b/Makefile @@ -4,18 +4,11 @@ RUSTUP = $(or $(shell which rustup), $(HOME)/.cargo/bin/rustup) NPM = $(or $(shell which npm), /usr/bin/npm) PINNED_NIGHTLY := $(shell cat smart_contracts/rust-toolchain) -# TODO: When `PINNED_NIGHTLY` is updated to something reletively new, we can get rid -# of this specific 'NIGHTLY_FOR_DOC' variable and use `PINNED_NIGHTLY` in `make doc` instead. -# -# At the moment, we can't use STABLE for doc, due to 'doc_auto_cfg' feature being unstable. -# We also can't use the nightly version that is pinned for the contracts, because it is too old. -NIGHTLY_FOR_DOC = nightly-2024-01-01 PINNED_STABLE := $(shell sed -nr 's/channel *= *\"(.*)\"/\1/p' rust-toolchain.toml) WASM_STRIP_VERSION := $(shell wasm-strip --version) CARGO_OPTS := --locked CARGO_PINNED_NIGHTLY := $(CARGO) +$(PINNED_NIGHTLY) $(CARGO_OPTS) -CARGO_NIGHTLY_FOR_DOC := $(CARGO) +$(NIGHTLY_FOR_DOC) $(CARGO_OPTS) CARGO := $(CARGO) $(CARGO_OPTS) DISABLE_LOGGING = RUST_LOG=MatchesNothing @@ -164,7 +157,7 @@ audit: audit-rs .PHONY: doc doc: - RUSTFLAGS="-D warnings" RUSTDOCFLAGS="--cfg docsrs" $(CARGO_NIGHTLY_FOR_DOC) doc --all-features $(CARGO_FLAGS) --no-deps + RUSTFLAGS="-D warnings" RUSTDOCFLAGS="--cfg docsrs" $(CARGO_PINNED_NIGHTLY) doc --all-features $(CARGO_FLAGS) --no-deps cd smart_contracts/contract && RUSTFLAGS="-D warnings" RUSTDOCFLAGS="--cfg docsrs" $(CARGO_PINNED_NIGHTLY) doc --all-features $(CARGO_FLAGS) --no-deps .PHONY: check-rs diff --git a/binary_port/src/lib.rs b/binary_port/src/lib.rs index ec0a173ccc..283753e084 100644 --- a/binary_port/src/lib.rs +++ b/binary_port/src/lib.rs @@ -1,5 +1,7 @@ //! A Rust library for types used by the binary port of a casper node. +#![allow(unexpected_cfgs)] + mod balance_response; mod binary_message; mod binary_request; diff --git a/storage/src/lib.rs b/storage/src/lib.rs index daa1c011ac..2609a054a9 100644 --- a/storage/src/lib.rs +++ b/storage/src/lib.rs @@ -6,6 +6,7 @@ html_logo_url = "https://raw.githubusercontent.com/CasperLabs/casper-node/master/images/CasperLabs_Logo_Symbol_RGB.png" )] #![cfg_attr(docsrs, feature(doc_auto_cfg))] +#![allow(unexpected_cfgs)] pub mod address_generator; pub mod block_store;