Sha256: cff01db49d28ab23b0b258bc6c0a5cc4071be4fe7248eef344a5d79d2fb649b7

Contents?: true

Size: 650 Bytes

Versions: 19

Compression:

Stored size: 650 Bytes

Contents

#[macro_use]
mod macros;

use syn::{Expr, Item};

#[test]
fn test_async_fn() {
    let input = "async fn process() {}";

    snapshot!(input as Item, @r###"
    Item::Fn {
        vis: Inherited,
        sig: Signature {
            asyncness: Some,
            ident: "process",
            generics: Generics,
            output: Default,
        },
        block: Block,
    }
    "###);
}

#[test]
fn test_async_closure() {
    let input = "async || {}";

    snapshot!(input as Expr, @r###"
    Expr::Closure {
        asyncness: Some,
        output: Default,
        body: Expr::Block {
            block: Block,
        },
    }
    "###);
}

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
wasmtime-14.0.4 ./ext/cargo-vendor/syn-1.0.109/tests/test_asyncness.rs
wasmtime-14.0.3 ./ext/cargo-vendor/syn-1.0.109/tests/test_asyncness.rs
wasmtime-14.0.1 ./ext/cargo-vendor/syn-1.0.109/tests/test_asyncness.rs
wasmtime-14.0.0 ./ext/cargo-vendor/syn-1.0.109/tests/test_asyncness.rs
wasmtime-13.0.0 ./ext/cargo-vendor/syn-1.0.109/tests/test_asyncness.rs
wasmtime-12.0.1 ./ext/cargo-vendor/syn-1.0.109/tests/test_asyncness.rs
wasmtime-12.0.0 ./ext/cargo-vendor/syn-1.0.109/tests/test_asyncness.rs
wasmtime-11.0.0 ./ext/cargo-vendor/syn-1.0.109/tests/test_asyncness.rs
wasmtime-10.0.1 ./ext/cargo-vendor/syn-1.0.109/tests/test_asyncness.rs
wasmtime-10.0.0 ./ext/cargo-vendor/syn-1.0.109/tests/test_asyncness.rs
wasmtime-9.0.4 ./ext/cargo-vendor/syn-1.0.109/tests/test_asyncness.rs
wasmtime-9.0.1 ./ext/cargo-vendor/syn-1.0.109/tests/test_asyncness.rs
wasmtime-8.0.0 ./ext/cargo-vendor/syn-1.0.109/tests/test_asyncness.rs
wasmtime-7.0.0 ./ext/cargo-vendor/syn-1.0.109/tests/test_asyncness.rs
wasmtime-6.0.1 ./ext/cargo-vendor/syn-1.0.108/tests/test_asyncness.rs
wasmtime-6.0.0 ./ext/cargo-vendor/syn-1.0.108/tests/test_asyncness.rs
wasmtime-5.0.0 ./ext/cargo-vendor/syn-1.0.107/tests/test_asyncness.rs
wasmtime-0.4.1 ./ext/cargo-vendor/syn-1.0.105/tests/test_asyncness.rs
wasmtime-0.4.0 ./ext/cargo-vendor/syn-1.0.105/tests/test_asyncness.rs