Skip to content

Commit

Permalink
applied suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-ardi committed May 14, 2024
1 parent bee186b commit 444d380
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
10 changes: 6 additions & 4 deletions compiler/rustc_parse/src/parser/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2954,10 +2954,12 @@ impl<'a> Parser<'a> {
err
}

/// This checks if this is a git diff marker, one of
/// >>>>>
/// =====
/// <<<<<
/// This checks if this is a git diff marker, depending of the parameter passed.
///
/// * `>>>>>`
/// * `=====`
/// * `<<<<<`
///
pub fn is_git_diff_marker(&mut self, long_kind: &TokenKind, short_kind: &TokenKind) -> bool {
(0..3).all(|i| self.look_ahead(i, |tok| tok == long_kind))
&& self.look_ahead(3, |tok| tok == short_kind)
Expand Down
5 changes: 3 additions & 2 deletions compiler/rustc_parse/src/parser/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1690,8 +1690,9 @@ impl<'a> Parser<'a> {
}

/// This function parses the fields of record structs:
/// - struct S { ... }
/// - enum E { variant { ... } }
///
/// - `struct S { ... }`
/// - `enum E { Variant { ... } }`
pub(crate) fn parse_record_struct_body(
&mut self,
adt_ty: &str,
Expand Down

0 comments on commit 444d380

Please sign in to comment.