Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Commit 230df0e

Browse files
authored
Upgrade to Rust 1.43.0 (#9754)
1 parent 2f08b12 commit 230df0e

File tree

7 files changed

+24
-18
lines changed

7 files changed

+24
-18
lines changed

ci/docker-rust-nightly/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM solanalabs/rust:1.42.0
1+
FROM solanalabs/rust:1.43.0
22
ARG date
33

44
RUN set -x \

ci/docker-rust/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Note: when the rust version is changed also modify
22
# ci/rust-version.sh to pick up the new image tag
3-
FROM rust:1.42.0
3+
FROM rust:1.43.0
44

55
# Add Google Protocol Buffers for Libra's metrics library.
66
ENV PROTOC_VERSION 3.8.0

ci/rust-version.sh

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
11
#
22
# This file maintains the rust versions for use by CI.
33
#
4-
# Build with stable rust, updating the stable toolchain if necessary:
5-
# $ source ci/rust-version.sh stable
6-
# $ cargo +"$rust_stable" build
4+
# Obtain the environment variables without any automatic toolchain updating:
5+
# $ source ci/rust-version.sh
76
#
8-
# Build with nightly rust, updating the nightly toolchain if necessary:
7+
# Obtain the environment variables updating both stable and nightly, only stable, or
8+
# only nightly:
9+
# $ source ci/rust-version.sh all
10+
# $ source ci/rust-version.sh stable
911
# $ source ci/rust-version.sh nightly
12+
13+
# Then to build with either stable or nightly:
14+
# $ cargo +"$rust_stable" build
1015
# $ cargo +"$rust_nightly" build
1116
#
12-
# Obtain the environment variables without any automatic toolchain updating:
13-
# $ source ci/rust-version.sh
14-
#
1517

1618
if [[ -n $RUST_STABLE_VERSION ]]; then
1719
stable_version="$RUST_STABLE_VERSION"
1820
else
19-
stable_version=1.42.0
21+
stable_version=1.43.0
2022
fi
2123

2224
if [[ -n $RUST_NIGHTLY_VERSION ]]; then
2325
nightly_version="$RUST_NIGHTLY_VERSION"
2426
else
25-
nightly_version=2020-03-12
27+
nightly_version=2020-04-23
2628
fi
2729

2830

@@ -51,6 +53,10 @@ export rust_nightly_docker_image=solanalabs/rust-nightly:"$nightly_version"
5153
nightly)
5254
rustup_install "$rust_nightly"
5355
;;
56+
all)
57+
rustup_install "$rust_stable"
58+
rustup_install "$rust_nightly"
59+
;;
5460
*)
5561
echo "Note: ignoring unknown argument: $1"
5662
;;

ci/test-bench.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ source ci/_
2525
source ci/upload-ci-artifact.sh
2626

2727
eval "$(ci/channel-info.sh)"
28-
source ci/rust-version.sh nightly
28+
source ci/rust-version.sh all
2929

3030
set -o pipefail
3131
export RUST_BACKTRACE=1

core/src/validator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ impl Validator {
388388
"New shred signal for the TVU should be the same as the clear bank signal."
389389
);
390390

391-
let vote_tracker = Arc::new({ VoteTracker::new(bank_forks.read().unwrap().root_bank()) });
391+
let vote_tracker = Arc::new(VoteTracker::new(bank_forks.read().unwrap().root_bank()));
392392

393393
let (retransmit_slots_sender, retransmit_slots_receiver) = unbounded();
394394
let tvu = Tvu::new(

logger/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::sync::{Arc, RwLock};
55

66
lazy_static! {
77
static ref LOGGER: Arc<RwLock<env_logger::Logger>> =
8-
{ Arc::new(RwLock::new(env_logger::Logger::from_default_env())) };
8+
Arc::new(RwLock::new(env_logger::Logger::from_default_env()));
99
}
1010

1111
struct LoggerShim {}

runtime/src/accounts_db.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ pub const DEFAULT_NUM_DIRS: u32 = 4;
6161
lazy_static! {
6262
// FROZEN_ACCOUNT_PANIC is used to signal local_cluster that an AccountsDB panic has occurred,
6363
// as |cargo test| cannot observe panics in other threads
64-
pub static ref FROZEN_ACCOUNT_PANIC: Arc<AtomicBool> = { Arc::new(AtomicBool::new(false)) };
64+
pub static ref FROZEN_ACCOUNT_PANIC: Arc<AtomicBool> = Arc::new(AtomicBool::new(false));
6565
}
6666

6767
#[derive(Debug, Default)]
@@ -3795,7 +3795,7 @@ pub mod tests {
37953795
assert_eq!(
37963796
vec![None, None, None],
37973797
(0..3)
3798-
.map({ |_| accounts.next_shrink_slot() })
3798+
.map(|_| accounts.next_shrink_slot())
37993799
.collect::<Vec<_>>()
38003800
);
38013801

@@ -3804,15 +3804,15 @@ pub mod tests {
38043804
assert_eq!(
38053805
vec![Some(7), Some(7), Some(7)],
38063806
(0..3)
3807-
.map({ |_| accounts.next_shrink_slot() })
3807+
.map(|_| accounts.next_shrink_slot())
38083808
.collect::<Vec<_>>()
38093809
);
38103810

38113811
current_slot += 1;
38123812
accounts.add_root(current_slot);
38133813

38143814
let slots = (0..6)
3815-
.map({ |_| accounts.next_shrink_slot() })
3815+
.map(|_| accounts.next_shrink_slot())
38163816
.collect::<Vec<_>>();
38173817

38183818
// Because the origin of this data is HashMap (not BTreeMap), key order is arbitrary per cycle.

0 commit comments

Comments
 (0)