From afa94d4f37b9a0a1e723edffcc79c3d48799bad1 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 9 Aug 2018 17:44:40 +0300 Subject: fn_item -> function --- src/grammar/items/mod.rs | 12 ++++++------ src/grammar/mod.rs | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/grammar') diff --git a/src/grammar/items/mod.rs b/src/grammar/items/mod.rs index 824f1296c..3bf906f85 100644 --- a/src/grammar/items/mod.rs +++ b/src/grammar/items/mod.rs @@ -107,8 +107,8 @@ pub(super) fn maybe_item(p: &mut Parser) -> MaybeItem { // test unsafe_fn // unsafe fn foo() {} FN_KW => { - fn_item(p); - FN_ITEM + function(p); + FUNCTION } // test unsafe_trait @@ -217,12 +217,12 @@ fn extern_block(p: &mut Parser) { p.expect(R_CURLY); } -fn fn_item(p: &mut Parser) { +fn function(p: &mut Parser) { assert!(p.at(FN_KW)); p.bump(); name(p); - // test fn_item_type_params + // test function_type_params // fn foo(){} type_params::type_param_list(p); @@ -231,12 +231,12 @@ fn fn_item(p: &mut Parser) { } else { p.error("expected function arguments"); } - // test fn_item_ret_type + // test function_ret_type // fn foo() {} // fn bar() -> () {} fn_ret_type(p); - // test fn_item_where_clause + // test function_where_clause // fn foo() where T: Copy {} type_params::where_clause(p); diff --git a/src/grammar/mod.rs b/src/grammar/mod.rs index 1e7d04ce9..e1329044d 100644 --- a/src/grammar/mod.rs +++ b/src/grammar/mod.rs @@ -14,7 +14,7 @@ //! `// test name-of-the-test` comment and look like this: //! //! ``` -//! // test fn_item_with_zero_parameters +//! // test function_with_zero_parameters //! // fn foo() {} //! ``` //! -- cgit v1.2.3