• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 mod features;
2 
3 #[macro_use]
4 mod macros;
5 
6 use syn::{Expr, Item};
7 
8 #[test]
test_async_fn()9 fn test_async_fn() {
10     let input = "async fn process() {}";
11 
12     snapshot!(input as Item, @r###"
13     Item::Fn {
14         vis: Inherited,
15         sig: Signature {
16             asyncness: Some,
17             ident: "process",
18             generics: Generics,
19             output: Default,
20         },
21         block: Block,
22     }
23     "###);
24 }
25 
26 #[test]
test_async_closure()27 fn test_async_closure() {
28     let input = "async || {}";
29 
30     snapshot!(input as Expr, @r###"
31     Expr::Closure {
32         asyncness: Some,
33         output: Default,
34         body: Expr::Block {
35             block: Block,
36         },
37     }
38     "###);
39 }
40