From d39198490f878a9ae395af1cf923fb7375de4548 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 30 Jul 2018 15:32:19 +0300 Subject: fn ret type --- src/parser/grammar/items/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/parser/grammar/items/mod.rs b/src/parser/grammar/items/mod.rs index 5d8d57a80..d059833a0 100644 --- a/src/parser/grammar/items/mod.rs +++ b/src/parser/grammar/items/mod.rs @@ -206,6 +206,7 @@ fn extern_block(p: &mut Parser) { p.expect(R_CURLY); } + fn fn_item(p: &mut Parser) { assert!(p.at(FN_KW)); p.bump(); @@ -216,7 +217,10 @@ fn fn_item(p: &mut Parser) { } else { p.error("expected function arguments"); } - + // test fn_item_ret_type + // fn foo() {} + // fn bar() -> () {} + fn_ret_type(p); block(p); fn block(p: &mut Parser) { -- cgit v1.2.3