mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-26 06:57:43 +02:00
bump msrv to 1.46 (#1858)
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
|
||||
[](https://crates.io/crates/actix-web-codegen)
|
||||
[](https://docs.rs/actix-web-codegen/0.4.0/actix_web_codegen/)
|
||||
[](https://blog.rust-lang.org/2020/03/12/Rust-1.42.html)
|
||||
[](https://blog.rust-lang.org/2020/03/12/Rust-1.46.html)
|
||||
[](https://travis-ci.org/actix/actix-web)
|
||||
[](https://codecov.io/gh/actix/actix-web)
|
||||
[](https://gitter.im/actix/actix?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
@ -14,7 +14,7 @@
|
||||
- [API Documentation](https://docs.rs/actix-web-codegen)
|
||||
- [Chat on Gitter](https://gitter.im/actix/actix-web)
|
||||
- Cargo package: [actix-web-codegen](https://crates.io/crates/actix-web-codegen)
|
||||
- Minimum supported Rust version: 1.42 or later.
|
||||
- Minimum supported Rust version: 1.46 or later.
|
||||
|
||||
## Compile Testing
|
||||
Uses the [`trybuild`] crate. All compile fail tests should include a stderr file generated by `trybuild`. See the [workflow section](https://github.com/dtolnay/trybuild#workflow) of the trybuild docs for info on how to do this.
|
||||
|
@ -6,31 +6,15 @@ fn compile_macros() {
|
||||
t.compile_fail("tests/trybuild/simple-fail.rs");
|
||||
|
||||
t.pass("tests/trybuild/route-ok.rs");
|
||||
|
||||
test_route_duplicate_unexpected_method(&t);
|
||||
test_route_missing_method(&t)
|
||||
}
|
||||
|
||||
#[rustversion::stable(1.42)]
|
||||
fn test_route_missing_method(t: &trybuild::TestCases) {
|
||||
t.compile_fail("tests/trybuild/route-missing-method-fail-msrv.rs");
|
||||
}
|
||||
|
||||
#[rustversion::not(stable(1.42))]
|
||||
#[rustversion::not(nightly)]
|
||||
fn test_route_missing_method(t: &trybuild::TestCases) {
|
||||
t.compile_fail("tests/trybuild/route-missing-method-fail.rs");
|
||||
}
|
||||
|
||||
#[rustversion::nightly]
|
||||
fn test_route_missing_method(_t: &trybuild::TestCases) {}
|
||||
|
||||
// FIXME: Re-test them on nightly once rust-lang/rust#77993 is fixed.
|
||||
#[rustversion::not(nightly)]
|
||||
fn test_route_duplicate_unexpected_method(t: &trybuild::TestCases) {
|
||||
t.compile_fail("tests/trybuild/route-duplicate-method-fail.rs");
|
||||
t.compile_fail("tests/trybuild/route-unexpected-method-fail.rs");
|
||||
}
|
||||
|
||||
#[rustversion::nightly]
|
||||
fn test_route_duplicate_unexpected_method(_t: &trybuild::TestCases) {}
|
||||
// #[rustversion::not(nightly)]
|
||||
// fn skip_on_nightly(t: &trybuild::TestCases) {
|
||||
//
|
||||
// }
|
||||
|
||||
// #[rustversion::nightly]
|
||||
// fn skip_on_nightly(_t: &trybuild::TestCases) {}
|
||||
|
@ -1 +0,0 @@
|
||||
route-missing-method-fail.rs
|
@ -1,11 +0,0 @@
|
||||
error: The #[route(..)] macro requires at least one `method` attribute
|
||||
--> $DIR/route-missing-method-fail-msrv.rs:3:1
|
||||
|
|
||||
3 | #[route("/")]
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error[E0425]: cannot find value `index` in this scope
|
||||
--> $DIR/route-missing-method-fail-msrv.rs:12:49
|
||||
|
|
||||
12 | let srv = test::start(|| App::new().service(index));
|
||||
| ^^^^^ not found in this scope
|
Reference in New Issue
Block a user