Upgrade to Rust 1.42 (#8836)

* Upgrade to Rust 1.42

* deref

* parens

Co-authored-by: Trent Nelson <trent@solana.com>
This commit is contained in:
Michael Vines 2020-03-13 13:15:22 -07:00 committed by GitHub
parent 52b254071c
commit b7b36bb0a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 9 additions and 7 deletions

View File

@ -1,4 +1,4 @@
FROM solanalabs/rust:1.41.1
FROM solanalabs/rust:1.42.0
ARG date
RUN set -x \

View File

@ -15,6 +15,8 @@ To update the pinned version:
1. Run `ci/docker-rust-nightly/build.sh` to rebuild the nightly image locally,
or potentially `ci/docker-rust-nightly/build.sh YYYY-MM-DD` if there's a
specific YYYY-MM-DD that is desired (default is today's build).
Check https://rust-lang.github.io/rustup-components-history/ for build
status
1. Update `ci/rust-version.sh` to reflect the new nightly `YYY-MM-DD`
1. Run `SOLANA_DOCKER_RUN_NOSETUID=1 ci/docker-run.sh --nopull solanalabs/rust-nightly:YYYY-MM-DD ci/test-coverage.sh`
to confirm the new nightly image builds. Fix any issues as needed

View File

@ -1,6 +1,6 @@
# Note: when the rust version is changed also modify
# ci/rust-version.sh to pick up the new image tag
FROM rust:1.41.1
FROM rust:1.42.0
# Add Google Protocol Buffers for Libra's metrics library.
ENV PROTOC_VERSION 3.8.0

View File

@ -16,13 +16,13 @@
if [[ -n $RUST_STABLE_VERSION ]]; then
stable_version="$RUST_STABLE_VERSION"
else
stable_version=1.41.1
stable_version=1.42.0
fi
if [[ -n $RUST_NIGHTLY_VERSION ]]; then
nightly_version="$RUST_NIGHTLY_VERSION"
else
nightly_version=2020-02-27
nightly_version=2020-03-12
fi

View File

@ -3947,7 +3947,7 @@ pub mod tests {
.flat_map(|k| {
let begin = k * gap + 1;
let end = (k + 1) * gap;
(begin..end)
begin..end
})
.collect();
assert_eq!(

View File

@ -1005,7 +1005,7 @@ impl Bank {
let results = self
.rc
.accounts
.lock_accounts(txs, iteration_order.as_ref().map(|v| v.as_slice()));
.lock_accounts(txs, iteration_order.as_deref());
TransactionBatch::new(results, &self, txs, iteration_order)
}

View File

@ -39,7 +39,7 @@ impl<'a, 'b> TransactionBatch<'a, 'b> {
}
pub fn iteration_order(&self) -> Option<&[usize]> {
self.iteration_order.as_ref().map(|v| v.as_slice())
self.iteration_order.as_deref()
}
pub fn bank(&self) -> &Bank {
self.bank