1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-06-26 18:37:42 +02:00

prepare macros v0.2.0 release (#261)

This commit is contained in:
Rob Ede
2021-02-02 02:07:58 +00:00
committed by GitHub
parent 057e7cd7c9
commit 66bd5bf4a2
19 changed files with 85 additions and 57 deletions

View File

@ -3,7 +3,9 @@ fn compile_macros() {
let t = trybuild::TestCases::new();
t.pass("tests/trybuild/main-01-basic.rs");
t.compile_fail("tests/trybuild/main-02-only-async.rs");
t.pass("tests/trybuild/main-03-fn-params.rs");
t.pass("tests/trybuild/test-01-basic.rs");
t.pass("tests/trybuild/test-02-keep-attrs.rs");
t.compile_fail("tests/trybuild/test-03-only-async.rs");
}

View File

@ -1,4 +1,4 @@
error: only async fn is supported
error: the async keyword is missing from the function declaration
--> $DIR/main-02-only-async.rs:2:1
|
2 | fn main() {

View File

@ -0,0 +1,6 @@
#[actix_rt::main]
async fn main2(_param: bool) {
futures_util::future::ready(()).await
}
fn main() {}

View File

@ -0,0 +1,6 @@
#[actix_rt::test]
fn my_test() {
futures_util::future::ready(()).await
}
fn main() {}

View File

@ -0,0 +1,5 @@
error: the async keyword is missing from the function declaration
--> $DIR/test-03-only-async.rs:2:1
|
2 | fn my_test() {
| ^^