Sha256: 3868181f25f7470476077f80a442a7804b6b9b371ad5917f4fd18b1002714c64

Contents?: true

Size: 728 Bytes

Versions: 14

Compression:

Stored size: 728 Bytes

Contents

#![allow(clippy::uninlined_format_args)]

#[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: Visibility::Inherited,
        sig: Signature {
            asyncness: Some,
            ident: "process",
            generics: Generics,
            output: ReturnType::Default,
        },
        block: Block,
    }
    "###);
}

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

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

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
wasmtime-14.0.4 ./ext/cargo-vendor/syn-2.0.38/tests/test_asyncness.rs
wasmtime-14.0.3 ./ext/cargo-vendor/syn-2.0.38/tests/test_asyncness.rs
wasmtime-14.0.1 ./ext/cargo-vendor/syn-2.0.38/tests/test_asyncness.rs
wasmtime-14.0.0 ./ext/cargo-vendor/syn-2.0.38/tests/test_asyncness.rs
wasmtime-13.0.0 ./ext/cargo-vendor/syn-2.0.29/tests/test_asyncness.rs
wasmtime-12.0.1 ./ext/cargo-vendor/syn-2.0.29/tests/test_asyncness.rs
wasmtime-12.0.0 ./ext/cargo-vendor/syn-2.0.29/tests/test_asyncness.rs
wasmtime-11.0.0 ./ext/cargo-vendor/syn-2.0.29/tests/test_asyncness.rs
wasmtime-10.0.1 ./ext/cargo-vendor/syn-2.0.28/tests/test_asyncness.rs
wasmtime-10.0.0 ./ext/cargo-vendor/syn-2.0.28/tests/test_asyncness.rs
wasmtime-9.0.4 ./ext/cargo-vendor/syn-2.0.28/tests/test_asyncness.rs
wasmtime-9.0.1 ./ext/cargo-vendor/syn-2.0.16/tests/test_asyncness.rs
wasmtime-8.0.0 ./ext/cargo-vendor/syn-2.0.15/tests/test_asyncness.rs
wasmtime-7.0.0 ./ext/cargo-vendor/syn-2.0.12/tests/test_asyncness.rs