Skip to content

Commit 9828559

Browse files
committed
parser: is_fn_front_matter -> check_fn_front_matter
1 parent 4ca3bbf commit 9828559

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/librustc_parse/parser/item.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ impl<'a> Parser<'a> {
9696
return Ok(Some(item));
9797
}
9898

99-
if self.is_fn_front_matter() {
99+
if self.check_fn_front_matter() {
100100
// FUNCTION ITEM
101101
let (ident, sig, generics, body) = self.parse_fn(&mut false, &mut attrs, |_| true)?;
102102
let kind = ItemKind::Fn(sig, generics, body);
@@ -742,7 +742,7 @@ impl<'a> Parser<'a> {
742742
let defaultness = self.parse_defaultness();
743743
let (name, kind, generics) = if self.eat_keyword(kw::Type) {
744744
self.parse_assoc_ty()?
745-
} else if self.is_fn_front_matter() {
745+
} else if self.check_fn_front_matter() {
746746
let (ident, sig, generics, body) = self.parse_fn(at_end, &mut attrs, req_name)?;
747747
(ident, AssocItemKind::Fn(sig, body), generics)
748748
} else if let Some(mac) = self.parse_assoc_macro_invoc("associated", Some(&vis), at_end)? {
@@ -978,7 +978,7 @@ impl<'a> Parser<'a> {
978978
if self.check_keyword(kw::Type) {
979979
// FOREIGN TYPE ITEM
980980
self.parse_item_foreign_type(vis, lo, attrs)
981-
} else if self.is_fn_front_matter() {
981+
} else if self.check_fn_front_matter() {
982982
// FOREIGN FUNCTION ITEM
983983
let (ident, sig, generics, body) = self.parse_fn(&mut false, &mut attrs, |_| true)?;
984984
let kind = ForeignItemKind::Fn(sig, generics, body);
@@ -1658,7 +1658,7 @@ impl<'a> Parser<'a> {
16581658
}
16591659

16601660
/// 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 {
16621662
// We use an over-approximation here.
16631663
// `const const`, `fn const` won't parse, but we're not stepping over other syntax either.
16641664
const QUALS: [Symbol; 4] = [kw::Const, kw::Async, kw::Unsafe, kw::Extern];

0 commit comments

Comments
 (0)