1 #![allow(clippy::single_match)] 2 3 #[macro_use] 4 extern crate combine; 5 6 parser! { 7 pub fn test[Input]()(Input) -> () 8 where [Input: ::combine::Stream<Token = char>] 9 { 10 11 use combine::parser::token::value; 12 13 let _ = (); 14 fn _test() { } 15 match Some(1) { 16 Some(_) => (), 17 None => (), 18 } 19 value(()) 20 } 21 } 22 23 parser! { 24 pub fn test_that_parsers_with_unnamed_types_can_be_in_same_scope[Input]()(Input) -> () 25 where [Input: ::combine::Stream<Token = char>] 26 { 27 28 use combine::parser::token::value; 29 30 value(()) 31 } 32 } 33 34 #[test] test_that_we_dont_need_imports_for_this_macro_to_work()35fn test_that_we_dont_need_imports_for_this_macro_to_work() { 36 test::<&str>(); 37 test_that_parsers_with_unnamed_types_can_be_in_same_scope::<&str>(); 38 } 39