mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
review comments
This commit is contained in:
parent
6007e6f649
commit
757eb67992
@ -2173,7 +2173,7 @@ impl StructField {
|
|||||||
/// Id of the whole struct lives in `Item`.
|
/// Id of the whole struct lives in `Item`.
|
||||||
#[derive(Clone, RustcEncodable, RustcDecodable, Debug, HashStable)]
|
#[derive(Clone, RustcEncodable, RustcDecodable, Debug, HashStable)]
|
||||||
pub enum VariantData {
|
pub enum VariantData {
|
||||||
Struct(HirVec<StructField>, HirId, bool),
|
Struct(HirVec<StructField>, HirId, /* recovered */ bool),
|
||||||
Tuple(HirVec<StructField>, HirId),
|
Tuple(HirVec<StructField>, HirId),
|
||||||
Unit(HirId),
|
Unit(HirId),
|
||||||
}
|
}
|
||||||
|
@ -620,7 +620,7 @@ pub enum PatKind {
|
|||||||
|
|
||||||
/// A struct or struct variant pattern (e.g., `Variant {x, y, ..}`).
|
/// A struct or struct variant pattern (e.g., `Variant {x, y, ..}`).
|
||||||
/// The `bool` is `true` in the presence of a `..`.
|
/// 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)`).
|
/// A tuple struct/variant pattern (`Variant(x, y, .., z)`).
|
||||||
/// If the `..` pattern fragment is present, then `Option<usize>` denotes its position.
|
/// If the `..` pattern fragment is present, then `Option<usize>` denotes its position.
|
||||||
|
@ -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 fields = Vec::new();
|
||||||
let mut recovered = false;
|
let mut recovered = false;
|
||||||
if self.eat(&token::OpenDelim(token::Brace)) {
|
if self.eat(&token::OpenDelim(token::Brace)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user