diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index fe464bf27..2689804f0 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -16,7 +16,7 @@ jobs:
- { name: macOS, os: macos-latest, triple: x86_64-apple-darwin }
- { name: Windows, os: windows-2022, triple: x86_64-pc-windows-msvc }
version:
- - 1.52.0 # MSRV
+ - 1.54.0 # MSRV
- stable
- nightly
diff --git a/CHANGES.md b/CHANGES.md
index c870f10e7..83efa6f3b 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,6 +1,8 @@
# Changes
## Unreleased - 2021-xx-xx
+### Changed
+- Minimum supported Rust version (MSRV) is now 1.54.
## 4.0.0-beta.17 - 2021-12-29
diff --git a/Cargo.toml b/Cargo.toml
index 1b85e8e75..44c58e494 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -94,7 +94,6 @@ language-tags = "0.3"
once_cell = "1.5"
log = "0.4"
mime = "0.3"
-paste = "1"
pin-project-lite = "0.2.7"
regex = "1.4"
serde = { version = "1.0", features = ["derive"] }
diff --git a/README.md b/README.md
index afe6b1f8e..aac7818bd 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@
[![crates.io](https://img.shields.io/crates/v/actix-web?label=latest)](https://crates.io/crates/actix-web)
[![Documentation](https://docs.rs/actix-web/badge.svg?version=4.0.0-beta.17)](https://docs.rs/actix-web/4.0.0-beta.17)
-[![Version](https://img.shields.io/badge/rustc-1.52+-ab6000.svg)](https://blog.rust-lang.org/2021/05/06/Rust-1.52.0.html)
+[![Version](https://img.shields.io/badge/rustc-1.54+-ab6000.svg)](https://blog.rust-lang.org/2021/05/06/Rust-1.54.0.html)
![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/actix-web.svg)
[![Dependency Status](https://deps.rs/crate/actix-web/4.0.0-beta.17/status.svg)](https://deps.rs/crate/actix-web/4.0.0-beta.17)
@@ -32,7 +32,7 @@
- SSL support using OpenSSL or Rustls
- Middlewares ([Logger, Session, CORS, etc](https://actix.rs/docs/middleware/))
- Includes an async [HTTP client](https://docs.rs/awc/)
-- Runs on stable Rust 1.52+
+- Runs on stable Rust 1.54+
## Documentation
diff --git a/actix-files/CHANGES.md b/actix-files/CHANGES.md
index 65007c955..c626fd3fb 100644
--- a/actix-files/CHANGES.md
+++ b/actix-files/CHANGES.md
@@ -1,14 +1,15 @@
# Changes
## Unreleased - 2021-xx-xx
+- Minimum supported Rust version (MSRV) is now 1.54.
## 0.6.0-beta.12 - 2021-12-29
-* No significant changes since `0.6.0-beta.11`.
+- No significant changes since `0.6.0-beta.11`.
## 0.6.0-beta.11 - 2021-12-27
-* No significant changes since `0.6.0-beta.10`.
+- No significant changes since `0.6.0-beta.10`.
## 0.6.0-beta.10 - 2021-12-11
diff --git a/actix-files/README.md b/actix-files/README.md
index 3f310a607..41dd714d3 100644
--- a/actix-files/README.md
+++ b/actix-files/README.md
@@ -4,7 +4,7 @@
[![crates.io](https://img.shields.io/crates/v/actix-files?label=latest)](https://crates.io/crates/actix-files)
[![Documentation](https://docs.rs/actix-files/badge.svg?version=0.6.0-beta.12)](https://docs.rs/actix-files/0.6.0-beta.12)
-[![Version](https://img.shields.io/badge/rustc-1.52+-ab6000.svg)](https://blog.rust-lang.org/2021/05/06/Rust-1.52.0.html)
+[![Version](https://img.shields.io/badge/rustc-1.54+-ab6000.svg)](https://blog.rust-lang.org/2021/05/06/Rust-1.54.0.html)
![License](https://img.shields.io/crates/l/actix-files.svg)
[![dependency status](https://deps.rs/crate/actix-files/0.6.0-beta.12/status.svg)](https://deps.rs/crate/actix-files/0.6.0-beta.12)
@@ -15,4 +15,4 @@
- [API Documentation](https://docs.rs/actix-files/)
- [Example Project](https://github.com/actix/examples/tree/master/basics/static_index)
-- Minimum Supported Rust Version (MSRV): 1.52
+- Minimum Supported Rust Version (MSRV): 1.54
diff --git a/actix-http-test/CHANGES.md b/actix-http-test/CHANGES.md
index 8c6a63b72..e83e95bd3 100644
--- a/actix-http-test/CHANGES.md
+++ b/actix-http-test/CHANGES.md
@@ -1,6 +1,7 @@
# Changes
## Unreleased - 2021-xx-xx
+- Minimum supported Rust version (MSRV) is now 1.54.
## 3.0.0-beta.10 - 2021-12-27
diff --git a/actix-http-test/README.md b/actix-http-test/README.md
index 589c54c23..e2cdc0ba2 100644
--- a/actix-http-test/README.md
+++ b/actix-http-test/README.md
@@ -4,7 +4,7 @@
[![crates.io](https://img.shields.io/crates/v/actix-http-test?label=latest)](https://crates.io/crates/actix-http-test)
[![Documentation](https://docs.rs/actix-http-test/badge.svg?version=3.0.0-beta.10)](https://docs.rs/actix-http-test/3.0.0-beta.10)
-[![Version](https://img.shields.io/badge/rustc-1.52+-ab6000.svg)](https://blog.rust-lang.org/2021/05/06/Rust-1.52.0.html)
+[![Version](https://img.shields.io/badge/rustc-1.54+-ab6000.svg)](https://blog.rust-lang.org/2021/05/06/Rust-1.54.0.html)
![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/actix-http-test)
[![Dependency Status](https://deps.rs/crate/actix-http-test/3.0.0-beta.10/status.svg)](https://deps.rs/crate/actix-http-test/3.0.0-beta.10)
@@ -14,4 +14,4 @@
## Documentation & Resources
- [API Documentation](https://docs.rs/actix-http-test)
-- Minimum Supported Rust Version (MSRV): 1.52
+- Minimum Supported Rust Version (MSRV): 1.54
diff --git a/actix-http/CHANGES.md b/actix-http/CHANGES.md
index d74a754ac..6911d9969 100644
--- a/actix-http/CHANGES.md
+++ b/actix-http/CHANGES.md
@@ -1,6 +1,7 @@
# Changes
## Unreleased - 2021-xx-xx
+- Minimum supported Rust version (MSRV) is now 1.54.
## 3.0.0-beta.17 - 2021-12-27
diff --git a/actix-http/README.md b/actix-http/README.md
index 223e18ceb..084753ac9 100644
--- a/actix-http/README.md
+++ b/actix-http/README.md
@@ -4,7 +4,7 @@
[![crates.io](https://img.shields.io/crates/v/actix-http?label=latest)](https://crates.io/crates/actix-http)
[![Documentation](https://docs.rs/actix-http/badge.svg?version=3.0.0-beta.17)](https://docs.rs/actix-http/3.0.0-beta.17)
-[![Version](https://img.shields.io/badge/rustc-1.52+-ab6000.svg)](https://blog.rust-lang.org/2021/05/06/Rust-1.52.0.html)
+[![Version](https://img.shields.io/badge/rustc-1.54+-ab6000.svg)](https://blog.rust-lang.org/2021/05/06/Rust-1.54.0.html)
![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/actix-http.svg)
[![dependency status](https://deps.rs/crate/actix-http/3.0.0-beta.17/status.svg)](https://deps.rs/crate/actix-http/3.0.0-beta.17)
@@ -14,7 +14,7 @@
## Documentation & Resources
- [API Documentation](https://docs.rs/actix-http)
-- Minimum Supported Rust Version (MSRV): 1.52
+- Minimum Supported Rust Version (MSRV): 1.54
## Example
diff --git a/actix-multipart/CHANGES.md b/actix-multipart/CHANGES.md
index a9a1e8784..65fe51d44 100644
--- a/actix-multipart/CHANGES.md
+++ b/actix-multipart/CHANGES.md
@@ -1,10 +1,11 @@
# Changes
## Unreleased - 2021-xx-xx
+- Minimum supported Rust version (MSRV) is now 1.54.
## 0.4.0-beta.11 - 2021-12-27
-* No significant changes since `0.4.0-beta.10`.
+- No significant changes since `0.4.0-beta.10`.
## 0.4.0-beta.10 - 2021-12-11
diff --git a/actix-multipart/README.md b/actix-multipart/README.md
index a9ee325ba..a773f5d52 100644
--- a/actix-multipart/README.md
+++ b/actix-multipart/README.md
@@ -4,7 +4,7 @@
[![crates.io](https://img.shields.io/crates/v/actix-multipart?label=latest)](https://crates.io/crates/actix-multipart)
[![Documentation](https://docs.rs/actix-multipart/badge.svg?version=0.4.0-beta.11)](https://docs.rs/actix-multipart/0.4.0-beta.11)
-[![Version](https://img.shields.io/badge/rustc-1.52+-ab6000.svg)](https://blog.rust-lang.org/2021/05/06/Rust-1.52.0.html)
+[![Version](https://img.shields.io/badge/rustc-1.54+-ab6000.svg)](https://blog.rust-lang.org/2021/05/06/Rust-1.54.0.html)
![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/actix-multipart.svg)
[![dependency status](https://deps.rs/crate/actix-multipart/0.4.0-beta.11/status.svg)](https://deps.rs/crate/actix-multipart/0.4.0-beta.11)
@@ -14,4 +14,4 @@
## Documentation & Resources
- [API Documentation](https://docs.rs/actix-multipart)
-- Minimum Supported Rust Version (MSRV): 1.52
+- Minimum Supported Rust Version (MSRV): 1.54
diff --git a/actix-router/CHANGES.md b/actix-router/CHANGES.md
index 0a6a56359..c85d10e2a 100644
--- a/actix-router/CHANGES.md
+++ b/actix-router/CHANGES.md
@@ -1,6 +1,7 @@
# Changes
## Unreleased - 2021-xx-xx
+- Minimum supported Rust version (MSRV) is now 1.54.
## 0.5.0-beta.3 - 2021-12-17
diff --git a/actix-test/CHANGES.md b/actix-test/CHANGES.md
index 2de0a69d6..9838c6f5f 100644
--- a/actix-test/CHANGES.md
+++ b/actix-test/CHANGES.md
@@ -1,10 +1,11 @@
# Changes
## Unreleased - 2021-xx-xx
+- Minimum supported Rust version (MSRV) is now 1.54.
## 0.1.0-beta.10 - 2021-12-27
-* No significant changes since `0.1.0-beta.9`.
+- No significant changes since `0.1.0-beta.9`.
## 0.1.0-beta.9 - 2021-12-17
diff --git a/actix-web-actors/CHANGES.md b/actix-web-actors/CHANGES.md
index 2fbbe7444..5c8091fbb 100644
--- a/actix-web-actors/CHANGES.md
+++ b/actix-web-actors/CHANGES.md
@@ -1,10 +1,11 @@
# Changes
## Unreleased - 2021-xx-xx
+- Minimum supported Rust version (MSRV) is now 1.54.
## 4.0.0-beta.9 - 2021-12-27
-* No significant changes since `4.0.0-beta.8`.
+- No significant changes since `4.0.0-beta.8`.
## 4.0.0-beta.8 - 2021-12-11
diff --git a/actix-web-actors/README.md b/actix-web-actors/README.md
index 232c81eac..0bd007e6a 100644
--- a/actix-web-actors/README.md
+++ b/actix-web-actors/README.md
@@ -4,7 +4,7 @@
[![crates.io](https://img.shields.io/crates/v/actix-web-actors?label=latest)](https://crates.io/crates/actix-web-actors)
[![Documentation](https://docs.rs/actix-web-actors/badge.svg?version=4.0.0-beta.9)](https://docs.rs/actix-web-actors/4.0.0-beta.9)
-[![Version](https://img.shields.io/badge/rustc-1.52+-ab6000.svg)](https://blog.rust-lang.org/2021/05/06/Rust-1.52.0.html)
+[![Version](https://img.shields.io/badge/rustc-1.54+-ab6000.svg)](https://blog.rust-lang.org/2021/05/06/Rust-1.54.0.html)
![License](https://img.shields.io/crates/l/actix-web-actors.svg)
[![dependency status](https://deps.rs/crate/actix-web-actors/4.0.0-beta.9/status.svg)](https://deps.rs/crate/actix-web-actors/4.0.0-beta.9)
@@ -14,4 +14,4 @@
## Documentation & Resources
- [API Documentation](https://docs.rs/actix-web-actors)
-- Minimum Supported Rust Version (MSRV): 1.52
+- Minimum Supported Rust Version (MSRV): 1.54
diff --git a/actix-web-codegen/CHANGES.md b/actix-web-codegen/CHANGES.md
index 0d881d303..5f8c0f259 100644
--- a/actix-web-codegen/CHANGES.md
+++ b/actix-web-codegen/CHANGES.md
@@ -1,6 +1,7 @@
# Changes
## Unreleased - 2021-xx-xx
+- Minimum supported Rust version (MSRV) is now 1.54.
## 0.5.0-beta.6 - 2021-12-11
diff --git a/actix-web-codegen/README.md b/actix-web-codegen/README.md
index f05d3f22c..abb638cee 100644
--- a/actix-web-codegen/README.md
+++ b/actix-web-codegen/README.md
@@ -4,7 +4,7 @@
[![crates.io](https://img.shields.io/crates/v/actix-web-codegen?label=latest)](https://crates.io/crates/actix-web-codegen)
[![Documentation](https://docs.rs/actix-web-codegen/badge.svg?version=0.5.0-beta.6)](https://docs.rs/actix-web-codegen/0.5.0-beta.6)
-[![Version](https://img.shields.io/badge/rustc-1.52+-ab6000.svg)](https://blog.rust-lang.org/2021/05/06/Rust-1.52.0.html)
+[![Version](https://img.shields.io/badge/rustc-1.54+-ab6000.svg)](https://blog.rust-lang.org/2021/05/06/Rust-1.54.0.html)
![License](https://img.shields.io/crates/l/actix-web-codegen.svg)
[![dependency status](https://deps.rs/crate/actix-web-codegen/0.5.0-beta.6/status.svg)](https://deps.rs/crate/actix-web-codegen/0.5.0-beta.6)
@@ -14,7 +14,7 @@
## Documentation & Resources
- [API Documentation](https://docs.rs/actix-web-codegen)
-- Minimum Supported Rust Version (MSRV): 1.52
+- Minimum Supported Rust Version (MSRV): 1.54
## Compile Testing
diff --git a/actix-web-codegen/tests/trybuild.rs b/actix-web-codegen/tests/trybuild.rs
index dd70cb7ca..b2d9ce186 100644
--- a/actix-web-codegen/tests/trybuild.rs
+++ b/actix-web-codegen/tests/trybuild.rs
@@ -1,4 +1,4 @@
-#[rustversion::stable(1.52)] // MSRV
+#[rustversion::stable(1.54)] // MSRV
#[test]
fn compile_macros() {
let t = trybuild::TestCases::new();
diff --git a/actix-web-codegen/tests/trybuild/route-missing-method-fail.stderr b/actix-web-codegen/tests/trybuild/route-missing-method-fail.stderr
index c36b090c0..b1cefafde 100644
--- a/actix-web-codegen/tests/trybuild/route-missing-method-fail.stderr
+++ b/actix-web-codegen/tests/trybuild/route-missing-method-fail.stderr
@@ -1,13 +1,13 @@
error: The #[route(..)] macro requires at least one `method` attribute
- --> $DIR/route-missing-method-fail.rs:3:1
+ --> tests/trybuild/route-missing-method-fail.rs:3:1
|
3 | #[route("/")]
| ^^^^^^^^^^^^^
|
- = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
+ = note: this error originates in the attribute macro `route` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `fn() -> impl std::future::Future {index}: HttpServiceFactory` is not satisfied
- --> $DIR/route-missing-method-fail.rs:12:55
+ --> tests/trybuild/route-missing-method-fail.rs:12:55
|
12 | let srv = actix_test::start(|| App::new().service(index));
| ^^^^^ the trait `HttpServiceFactory` is not implemented for `fn() -> impl std::future::Future {index}`
diff --git a/awc/README.md b/awc/README.md
index 4916210e4..2f8562181 100644
--- a/awc/README.md
+++ b/awc/README.md
@@ -12,7 +12,7 @@
- [API Documentation](https://docs.rs/awc)
- [Example Project](https://github.com/actix/examples/tree/HEAD/security/awc_https)
-- Minimum Supported Rust Version (MSRV): 1.52
+- Minimum Supported Rust Version (MSRV): 1.54
## Example
diff --git a/clippy.toml b/clippy.toml
index cef91fde7..ece14b8d2 100644
--- a/clippy.toml
+++ b/clippy.toml
@@ -1 +1 @@
-msrv = "1.52"
+msrv = "1.54"
diff --git a/scripts/bump b/scripts/bump
index 43cd8b8c7..1cd190e03 100755
--- a/scripts/bump
+++ b/scripts/bump
@@ -40,7 +40,7 @@ cat "$CHANGELOG_FILE" |
# if word count of changelog chunk is 0 then insert filler changelog chunk
if [ "$(wc -w "$CHANGE_CHUNK_FILE" | awk '{ print $1 }')" = "0" ]; then
- echo "* No significant changes since \`$CURRENT_VERSION\`." >"$CHANGE_CHUNK_FILE"
+ echo "- No significant changes since \`$CURRENT_VERSION\`." >"$CHANGE_CHUNK_FILE"
echo >>"$CHANGE_CHUNK_FILE"
echo >>"$CHANGE_CHUNK_FILE"
fi
diff --git a/src/error/internal.rs b/src/error/internal.rs
index 37195dc2e..1c6e343e3 100644
--- a/src/error/internal.rs
+++ b/src/error/internal.rs
@@ -118,15 +118,13 @@ where
macro_rules! error_helper {
($name:ident, $status:ident) => {
- paste::paste! {
- #[doc = "Helper function that wraps any error and generates a `" $status "` response."]
- #[allow(non_snake_case)]
- pub fn $name(err: T) -> Error
- where
- T: fmt::Debug + fmt::Display + 'static,
- {
- InternalError::new(err, StatusCode::$status).into()
- }
+ #[doc = concat!("Helper function that wraps any error and generates a `", stringify!($status), "` response.")]
+ #[allow(non_snake_case)]
+ pub fn $name(err: T) -> Error
+ where
+ T: fmt::Debug + fmt::Display + 'static,
+ {
+ InternalError::new(err, StatusCode::$status).into()
}
};
}
diff --git a/src/guard.rs b/src/guard.rs
index ebda69cb9..7a015d2da 100644
--- a/src/guard.rs
+++ b/src/guard.rs
@@ -270,22 +270,20 @@ impl Guard for MethodGuard {
macro_rules! method_guard {
($method_fn:ident, $method_const:ident) => {
- paste::paste! {
- #[doc = " Creates a guard that matches the `" $method_const "` request method."]
- ///
- /// # Examples
- #[doc = " The route in this example will only respond to `" $method_const "` requests."]
- /// ```
- /// use actix_web::{guard, web, HttpResponse};
- ///
- /// web::route()
- #[doc = " .guard(guard::" $method_fn "())"]
- /// .to(|| HttpResponse::Ok());
- /// ```
- #[allow(non_snake_case)]
- pub fn $method_fn() -> impl Guard {
- MethodGuard(HttpMethod::$method_const)
- }
+ #[doc = concat!("Creates a guard that matches the `", stringify!($method_const), "` request method.")]
+ ///
+ /// # Examples
+ #[doc = concat!("The route in this example will only respond to `", stringify!($method_const), "` requests.")]
+ /// ```
+ /// use actix_web::{guard, web, HttpResponse};
+ ///
+ /// web::route()
+ #[doc = concat!(" .guard(guard::", stringify!($method_fn), "())")]
+ /// .to(|| HttpResponse::Ok());
+ /// ```
+ #[allow(non_snake_case)]
+ pub fn $method_fn() -> impl Guard {
+ MethodGuard(HttpMethod::$method_const)
}
};
}
diff --git a/src/lib.rs b/src/lib.rs
index 5f5b915b7..18f0d581d 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -53,7 +53,7 @@
//! * SSL support using OpenSSL or Rustls
//! * Middlewares ([Logger, Session, CORS, etc](https://actix.rs/docs/middleware/))
//! * Includes an async [HTTP client](https://docs.rs/awc/)
-//! * Runs on stable Rust 1.52+
+//! * Runs on stable Rust 1.54+
//!
//! # Crate Features
//! * `cookies` - cookies support (enabled by default)
diff --git a/src/web.rs b/src/web.rs
index 47bff36a3..e4339352b 100644
--- a/src/web.rs
+++ b/src/web.rs
@@ -86,23 +86,21 @@ pub fn route() -> Route {
macro_rules! method_route {
($method_fn:ident, $method_const:ident) => {
- paste::paste! {
- #[doc = " Creates a new route with `" $method_const "` method guard."]
- ///
- /// # Examples
- #[doc = " In this example, one `" $method_const " /{project_id}` route is set up:"]
- /// ```
- /// use actix_web::{web, App, HttpResponse};
- ///
- /// let app = App::new().service(
- /// web::resource("/{project_id}")
- #[doc = " .route(web::" $method_fn "().to(|| HttpResponse::Ok()))"]
- ///
- /// );
- /// ```
- pub fn $method_fn() -> Route {
- method(Method::$method_const)
- }
+ #[doc = concat!(" Creates a new route with `", stringify!($method_const), "` method guard.")]
+ ///
+ /// # Examples
+ #[doc = concat!(" In this example, one `", stringify!($method_const), " /{project_id}` route is set up:")]
+ /// ```
+ /// use actix_web::{web, App, HttpResponse};
+ ///
+ /// let app = App::new().service(
+ /// web::resource("/{project_id}")
+ #[doc = concat!(" .route(web::", stringify!($method_fn), "().to(|| HttpResponse::Ok()))")]
+ ///
+ /// );
+ /// ```
+ pub fn $method_fn() -> Route {
+ method(Method::$method_const)
}
};
}