aboutsummaryrefslogtreecommitdiff
path: root/src/grammar
diff options
context:
space:
mode:
Diffstat (limited to 'src/grammar')
-rw-r--r--src/grammar/items/mod.rs12
-rw-r--r--src/grammar/mod.rs2
2 files changed, 7 insertions, 7 deletions
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 {
107 // test unsafe_fn 107 // test unsafe_fn
108 // unsafe fn foo() {} 108 // unsafe fn foo() {}
109 FN_KW => { 109 FN_KW => {
110 fn_item(p); 110 function(p);
111 FN_ITEM 111 FUNCTION
112 } 112 }
113 113
114 // test unsafe_trait 114 // test unsafe_trait
@@ -217,12 +217,12 @@ fn extern_block(p: &mut Parser) {
217 p.expect(R_CURLY); 217 p.expect(R_CURLY);
218} 218}
219 219
220fn fn_item(p: &mut Parser) { 220fn function(p: &mut Parser) {
221 assert!(p.at(FN_KW)); 221 assert!(p.at(FN_KW));
222 p.bump(); 222 p.bump();
223 223
224 name(p); 224 name(p);
225 // test fn_item_type_params 225 // test function_type_params
226 // fn foo<T: Clone + Copy>(){} 226 // fn foo<T: Clone + Copy>(){}
227 type_params::type_param_list(p); 227 type_params::type_param_list(p);
228 228
@@ -231,12 +231,12 @@ fn fn_item(p: &mut Parser) {
231 } else { 231 } else {
232 p.error("expected function arguments"); 232 p.error("expected function arguments");
233 } 233 }
234 // test fn_item_ret_type 234 // test function_ret_type
235 // fn foo() {} 235 // fn foo() {}
236 // fn bar() -> () {} 236 // fn bar() -> () {}
237 fn_ret_type(p); 237 fn_ret_type(p);
238 238
239 // test fn_item_where_clause 239 // test function_where_clause
240 // fn foo<T>() where T: Copy {} 240 // fn foo<T>() where T: Copy {}
241 type_params::where_clause(p); 241 type_params::where_clause(p);
242 242
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 @@
14//! `// test name-of-the-test` comment and look like this: 14//! `// test name-of-the-test` comment and look like this:
15//! 15//!
16//! ``` 16//! ```
17//! // test fn_item_with_zero_parameters 17//! // test function_with_zero_parameters
18//! // fn foo() {} 18//! // fn foo() {}
19//! ``` 19//! ```
20//! 20//!