From 9b3d806b0dbfcf76ff707aa86daba83454227720 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 3 Feb 2018 22:34:35 +0300 Subject: Add infra for inline tests --- src/parser/event_parser/grammar/items/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/parser/event_parser/grammar') diff --git a/src/parser/event_parser/grammar/items/mod.rs b/src/parser/event_parser/grammar/items/mod.rs index 8ccf8f90f..5cf2fc39a 100644 --- a/src/parser/event_parser/grammar/items/mod.rs +++ b/src/parser/event_parser/grammar/items/mod.rs @@ -52,11 +52,15 @@ fn item(p: &mut Parser) { STATIC_ITEM } CONST_KW => match p.nth(1) { + // test const_fn + // const fn foo() {} FN_KW => { p.bump(); fn_item(p); FN_ITEM } + // test const_unsafe_fn + // const unsafe fn foo() {} UNSAFE_KW if p.nth(2) == FN_KW => { p.bump(); p.bump(); -- cgit v1.2.3