@@ -96,7 +96,7 @@ impl<'a> Parser<'a> {
96
96
return Ok ( Some ( item) ) ;
97
97
}
98
98
99
- if self . is_fn_front_matter ( ) {
99
+ if self . check_fn_front_matter ( ) {
100
100
// FUNCTION ITEM
101
101
let ( ident, sig, generics, body) = self . parse_fn ( & mut false , & mut attrs, |_| true ) ?;
102
102
let kind = ItemKind :: Fn ( sig, generics, body) ;
@@ -742,7 +742,7 @@ impl<'a> Parser<'a> {
742
742
let defaultness = self . parse_defaultness ( ) ;
743
743
let ( name, kind, generics) = if self . eat_keyword ( kw:: Type ) {
744
744
self . parse_assoc_ty ( ) ?
745
- } else if self . is_fn_front_matter ( ) {
745
+ } else if self . check_fn_front_matter ( ) {
746
746
let ( ident, sig, generics, body) = self . parse_fn ( at_end, & mut attrs, req_name) ?;
747
747
( ident, AssocItemKind :: Fn ( sig, body) , generics)
748
748
} else if let Some ( mac) = self . parse_assoc_macro_invoc ( "associated" , Some ( & vis) , at_end) ? {
@@ -978,7 +978,7 @@ impl<'a> Parser<'a> {
978
978
if self . check_keyword ( kw:: Type ) {
979
979
// FOREIGN TYPE ITEM
980
980
self . parse_item_foreign_type ( vis, lo, attrs)
981
- } else if self . is_fn_front_matter ( ) {
981
+ } else if self . check_fn_front_matter ( ) {
982
982
// FOREIGN FUNCTION ITEM
983
983
let ( ident, sig, generics, body) = self . parse_fn ( & mut false , & mut attrs, |_| true ) ?;
984
984
let kind = ForeignItemKind :: Fn ( sig, generics, body) ;
@@ -1658,7 +1658,7 @@ impl<'a> Parser<'a> {
1658
1658
}
1659
1659
1660
1660
/// Is the current token the start of an `FnHeader` / not a valid parse?
1661
- fn is_fn_front_matter ( & mut self ) -> bool {
1661
+ fn check_fn_front_matter ( & mut self ) -> bool {
1662
1662
// We use an over-approximation here.
1663
1663
// `const const`, `fn const` won't parse, but we're not stepping over other syntax either.
1664
1664
const QUALS : [ Symbol ; 4 ] = [ kw:: Const , kw:: Async , kw:: Unsafe , kw:: Extern ] ;
0 commit comments