Skip to content

Commit

Permalink
feat: update to stable rust
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Orris committed Aug 15, 2023
1 parent 5494f5b commit 140f6a2
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 12 deletions.
8 changes: 8 additions & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,11 @@ spaces_around_ranges = false
trailing_comma = "Vertical"
trailing_semicolon = false
use_field_init_shorthand = true

# Unstable (nightly-only)
# imports_granularity = "Crate"
# reorder_imports = true
# spaces_around_ranges = false
# binop_separator = "Back"
# match_arm_blocks = false
# reorder_impl_items = false
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,16 @@ specs-rococo-local:

.PHONY: format
format:
cargo fmt
cargo +nightly fmt

# cargo fmt requires a toolchain version ^nightly-2022-11-15 because of unstable features
# cargo doc requires a toolchain version ^nightly-2022-11-15 because of a bug that causes a panic
# When the toolchain is updated to ^nightly-2023-06-01, `rustup run nightly-2023-06-01` can be removed
.PHONY: lint
lint:
cargo fmt --check
cargo +nightly-2023-06-01 fmt --check
SKIP_WASM_BUILD=1 env -u RUSTFLAGS cargo clippy --features runtime-benchmarks,frequency-lint-check -- -D warnings
RUSTDOCFLAGS="--enable-index-page --check -Zunstable-options" rustup run nightly-2023-06-01 cargo doc --no-deps --features frequency
RUSTDOCFLAGS="--enable-index-page --check -Zunstable-options" cargo +nightly-2023-06-01 doc --no-deps --features frequency

lint-audit:
cargo deny check -c .cargo-deny.toml
Expand Down
2 changes: 1 addition & 1 deletion pallets/capacity/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
// Substrate macros are tripping the clippy::expect_used lint.
#![allow(clippy::expect_used)]
#![cfg_attr(not(feature = "std"), no_std)]
#![feature(rustdoc_missing_doc_code_examples)]
// #![feature(rustdoc_missing_doc_code_examples)]
// Strong Documentation Lints
#![deny(
rustdoc::broken_intra_doc_links,
Expand Down
2 changes: 1 addition & 1 deletion pallets/frequency-tx-payment/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
// Substrate macros are tripping the clippy::expect_used lint.
#![allow(clippy::expect_used)]
#![cfg_attr(not(feature = "std"), no_std)]
#![feature(rustdoc_missing_doc_code_examples)]
// #![feature(rustdoc_missing_doc_code_examples)]

use codec::{Decode, Encode};
use frame_support::{
Expand Down
2 changes: 1 addition & 1 deletion pallets/handles/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
// Substrate macros are tripping the clippy::expect_used lint.
#![allow(clippy::expect_used)]
#![cfg_attr(not(feature = "std"), no_std)]
#![feature(rustdoc_missing_doc_code_examples)]
// #![feature(rustdoc_missing_doc_code_examples)]
// Strong Documentation Lints
#![deny(
rustdoc::broken_intra_doc_links,
Expand Down
2 changes: 1 addition & 1 deletion pallets/messages/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#![allow(clippy::expect_used)]
// Ensure we're `no_std` when compiling for Wasm.
#![cfg_attr(not(feature = "std"), no_std)]
#![feature(rustdoc_missing_doc_code_examples)]
// #![feature(rustdoc_missing_doc_code_examples)]
// Strong Documentation Lints
#![deny(
rustdoc::broken_intra_doc_links,
Expand Down
2 changes: 1 addition & 1 deletion pallets/msa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
// Substrate macros are tripping the clippy::expect_used lint.
#![allow(clippy::expect_used)]
#![cfg_attr(not(feature = "std"), no_std)]
#![feature(rustdoc_missing_doc_code_examples)]
// #![feature(rustdoc_missing_doc_code_examples)]
// Strong Documentation Lints
#![deny(
rustdoc::broken_intra_doc_links,
Expand Down
2 changes: 1 addition & 1 deletion pallets/schemas/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
// Substrate macros are tripping the clippy::expect_used lint.
#![allow(clippy::expect_used)]
#![cfg_attr(not(feature = "std"), no_std)]
#![feature(rustdoc_missing_doc_code_examples)]
// #![feature(rustdoc_missing_doc_code_examples)]
#![allow(rustdoc::private_intra_doc_links)]
// Strong Documentation Lints
#![deny(
Expand Down
2 changes: 1 addition & 1 deletion pallets/stateful-storage/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#![allow(clippy::expect_used)]
// Ensure we're `no_std` when compiling for Wasm.
#![cfg_attr(not(feature = "std"), no_std)]
#![feature(rustdoc_missing_doc_code_examples)]
// #![feature(rustdoc_missing_doc_code_examples)]
// Strong Documentation Lints
#![deny(
rustdoc::broken_intra_doc_links,
Expand Down
2 changes: 1 addition & 1 deletion pallets/time-release/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
// Substrate macros are tripping the clippy::expect_used lint.
#![allow(clippy::expect_used)]
#![cfg_attr(not(feature = "std"), no_std)]
#![feature(rustdoc_missing_doc_code_examples)]
// #![feature(rustdoc_missing_doc_code_examples)]
// Strong Documentation Lints
#![deny(
rustdoc::broken_intra_doc_links,
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "nightly-2022-11-15"
channel = "stable"
components = [ "clippy", "rust-docs", "rustfmt","rustc-dev", "rustc"]
targets = [ "wasm32-unknown-unknown" ]
profile = "minimal"

0 comments on commit 140f6a2

Please sign in to comment.