review comments

This commit is contained in:
Esteban Küber 2019-03-19 13:17:25 -07:00
parent 6007e6f649
commit 757eb67992
3 changed files with 5 additions and 3 deletions

View File

@ -2173,7 +2173,7 @@ impl StructField {
/// Id of the whole struct lives in `Item`.
#[derive(Clone, RustcEncodable, RustcDecodable, Debug, HashStable)]
pub enum VariantData {
Struct(HirVec<StructField>, HirId, bool),
Struct(HirVec<StructField>, HirId, /* recovered */ bool),
Tuple(HirVec<StructField>, HirId),
Unit(HirId),
}

View File

@ -620,7 +620,7 @@ pub enum PatKind {
/// A struct or struct variant pattern (e.g., `Variant {x, y, ..}`).
/// The `bool` is `true` in the presence of a `..`.
Struct(Path, Vec<Spanned<FieldPat>>, bool),
Struct(Path, Vec<Spanned<FieldPat>>, /* recovered */ bool),
/// A tuple struct/variant pattern (`Variant(x, y, .., z)`).
/// If the `..` pattern fragment is present, then `Option<usize>` denotes its position.

View File

@ -6902,7 +6902,9 @@ impl<'a> Parser<'a> {
}
}
fn parse_record_struct_body(&mut self) -> PResult<'a, (Vec<StructField>, bool)> {
fn parse_record_struct_body(
&mut self,
) -> PResult<'a, (Vec<StructField>, /* recovered */ bool)> {
let mut fields = Vec::new();
let mut recovered = false;
if self.eat(&token::OpenDelim(token::Brace)) {