Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade MSRV to Rust 1.67.1 #2611

Merged
merged 5 commits into from
Apr 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ jobs:
semver-checks:
name: check the semver status of this PR
runs-on: smithy_ubuntu-latest_8-core
needs:
- save-docker-login-token
- acquire-base-image
steps:
- uses: actions/checkout@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ on:
required: false

env:
rust_version: 1.66.1
rust_version: 1.67.1
rust_toolchain_components: clippy,rustfmt
ENCRYPTED_DOCKER_PASSWORD: ${{ secrets.ENCRYPTED_DOCKER_PASSWORD }}
DOCKER_LOGIN_TOKEN_PASSPHRASE: ${{ secrets.DOCKER_LOGIN_TOKEN_PASSPHRASE }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/claim-crate-names.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ concurrency:
cancel-in-progress: true

env:
rust_version: 1.66.1
rust_version: 1.67.1

name: Claim unpublished crate names on crates.io
run-name: ${{ github.workflow }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ concurrency:

env:
java_version: 11
rust_version: 1.66.1
rust_version: 1.67.1
rust_toolchain_components: clippy,rustfmt
apt_dependencies: libssl-dev gnuplot jq

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ concurrency:
cancel-in-progress: true

env:
rust_version: 1.66.1
rust_version: 1.67.1

name: Release smithy-rs
run-name: ${{ github.workflow }} ${{ inputs.semantic_version }} (${{ inputs.commit_sha }}) - ${{ inputs.dry_run && 'Dry run' || 'Production run' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-sdk-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.66.1
toolchain: 1.67.1
- name: Delete old SDK
run: |
- name: Generate a fresh SDK
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.next.toml
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,15 @@ message = "Add a sensitive method to `ParseHttpResponse`. When this returns true
author = "rcoh"
references = ["smithy-rs#2603"]
meta = { "breaking" = false, "tada" = false, "bug" = false, "target" = "client" }

[[aws-sdk-rust]]
message = "Update MSRV to Rust 1.67.1"
references = ["smithy-rs#2611"]
meta = { "breaking" = true, "tada" = false, "bug" = false }
author = "jdisanti"

[[smithy-rs]]
message = "Update MSRV to Rust 1.67.1"
references = ["smithy-rs#2611"]
meta = { "breaking" = true, "tada" = false, "bug" = false, "target" = "all"}
author = "jdisanti"
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ pub(super) fn merge_in(
}
}

fn merge_into_base<'a>(target: &mut Profile, profile: HashMap<&str, Cow<'a, str>>) {
fn merge_into_base(target: &mut Profile, profile: HashMap<&str, Cow<'_, str>>) {
for (k, v) in profile {
match validate_identifier(k) {
Ok(k) => {
Expand Down
1 change: 0 additions & 1 deletion aws/sdk/integration-tests/dynamodb/tests/endpoints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use aws_sdk_dynamodb::config::{self, Credentials, Region};
use aws_types::SdkConfig;
use http::Uri;

#[track_caller]
async fn expect_uri(
conf: SdkConfig,
uri: &'static str,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ object TestWorkspace {
// help rust select the right version when we run cargo test
// TODO(https://github.com/awslabs/smithy-rs/issues/2048): load this from the msrv property using a
// method as we do for runtime crate versions
"[toolchain]\nchannel = \"1.66.1\"\n",
"[toolchain]\nchannel = \"1.67.1\"\n",
)
// ensure there at least an empty lib.rs file to avoid broken crates
newProject.resolve("src").mkdirs()
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#

# Rust MSRV (entered into the generated README)
rust.msrv=1.66.1
rust.msrv=1.67.1

# To enable debug, swap out the two lines below.
# When changing this value, be sure to run `./gradlew --stop` to kill the Gradle daemon.
Expand Down
2 changes: 1 addition & 1 deletion rust-runtime/aws-smithy-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ where
> + Clone,
{
let _ = |o: static_tests::ValidTestOperation| {
let _ = self.call_raw(o);
drop(self.call_raw(o));
};
}
}
2 changes: 1 addition & 1 deletion rust-runtime/inlineable/src/endpoint_lib/arn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl<'a> Arn<'a> {
}
}

pub(crate) fn parse_arn<'a, 'b>(input: &'a str, e: &'b mut DiagnosticCollector) -> Option<Arn<'a>> {
pub(crate) fn parse_arn<'a>(input: &'a str, e: &mut DiagnosticCollector) -> Option<Arn<'a>> {
e.capture(Arn::parse(input))
}

Expand Down
2 changes: 1 addition & 1 deletion rust-runtime/inlineable/src/endpoint_lib/parse_url.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl<'a> Url<'a> {
}
}

pub(crate) fn parse_url<'a, 'b>(url: &'a str, e: &'b mut DiagnosticCollector) -> Option<Url<'a>> {
pub(crate) fn parse_url<'a>(url: &'a str, e: &mut DiagnosticCollector) -> Option<Url<'a>> {
let raw = url;
let uri: Uri = e.capture(url.parse())?;
let url: ParsedUrl = e.capture(url.parse())?;
Expand Down
2 changes: 1 addition & 1 deletion rust-runtime/inlineable/src/endpoint_lib/partition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ mod test {
use regex::Regex;
use std::collections::HashMap;

fn resolve<'a, 'b>(resolver: &'a PartitionResolver, region: &'b str) -> Partition<'a> {
fn resolve<'a>(resolver: &'a PartitionResolver, region: &str) -> Partition<'a> {
resolver
.resolve_partition(region, &mut DiagnosticCollector::new())
.expect("could not resolve partition")
Expand Down
4 changes: 2 additions & 2 deletions rust-runtime/inlineable/src/endpoint_lib/substring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ use crate::endpoint_lib::diagnostic::DiagnosticCollector;
/// - When `reverse` is false, indexes are evaluated from the beginning of the string
/// - When `reverse` is true, indexes are evaluated from the end of the string (however, the result
/// will still be "forwards" and `start` MUST be less than `end`.
pub(crate) fn substring<'a, 'b>(
pub(crate) fn substring<'a>(
input: &'a str,
start: usize,
stop: usize,
reverse: bool,
e: &'b mut DiagnosticCollector,
e: &mut DiagnosticCollector,
) -> Option<&'a str> {
if start >= stop {
e.capture(Err("start > stop"))?;
Expand Down
4 changes: 2 additions & 2 deletions rust-runtime/inlineable/src/endpoint_lib/uri_encode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ pub(crate) const BASE_SET: &AsciiSet = &CONTROLS
.add(b'\\');

// Returns `Option` for forwards compatibility
pub(crate) fn uri_encode<'a, 'b>(
pub(crate) fn uri_encode<'a>(
s: &'a str,
_e: &'b mut DiagnosticCollector,
_e: &mut DiagnosticCollector,
) -> std::borrow::Cow<'a, str> {
utf8_percent_encode(s, BASE_SET).into()
}
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "1.66.1"
channel = "1.67.1"
2 changes: 1 addition & 1 deletion tools/ci-build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# This is the base Docker build image used by CI

ARG base_image=public.ecr.aws/amazonlinux/amazonlinux:2
ARG rust_stable_version=1.66.1
ARG rust_stable_version=1.67.1
ARG rust_nightly_version=nightly-2022-11-16

FROM ${base_image} AS bare_base_image
Expand Down
4 changes: 2 additions & 2 deletions tools/ci-build/smithy-rs-tool-common/src/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ pub trait Git: Send + Sync {
/// Returns a list of commit hashes in reverse chronological order starting with
/// `start_inclusive_revision` and ending before `end_exclusive_revision`. Both of
/// these arguments can be any kind of Git revision (e.g., HEAD, HEAD~2, commit hash, etc).
fn rev_list<'a>(
fn rev_list(
&self,
start_inclusive_revision: &str,
end_exclusive_revision: &str,
path: Option<&'a Path>,
path: Option<&Path>,
) -> Result<Vec<CommitHash>>;

/// Returns information about a given revision.
Expand Down