diff options
Diffstat (limited to 'compiler/rustc_ast/src/ast.rs')
-rw-r--r-- | compiler/rustc_ast/src/ast.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/rustc_ast/src/ast.rs b/compiler/rustc_ast/src/ast.rs index 58725a08c..e8cbd7b69 100644 --- a/compiler/rustc_ast/src/ast.rs +++ b/compiler/rustc_ast/src/ast.rs @@ -33,7 +33,7 @@ use rustc_macros::HashStable_Generic; use rustc_serialize::{Decodable, Decoder, Encodable, Encoder}; use rustc_span::source_map::{respan, Spanned}; use rustc_span::symbol::{kw, sym, Ident, Symbol}; -use rustc_span::{Span, DUMMY_SP}; +use rustc_span::{ErrorGuaranteed, Span, DUMMY_SP}; use std::fmt; use std::mem; use thin_vec::{thin_vec, ThinVec}; @@ -1426,7 +1426,7 @@ pub enum ExprKind { /// of `if` / `while` expressions. (e.g., `if let 0 = x { .. }`). /// /// `Span` represents the whole `let pat = expr` statement. - Let(P<Pat>, P<Expr>, Span), + Let(P<Pat>, P<Expr>, Span, Option<ErrorGuaranteed>), /// An `if` block, with an optional `else` block. /// /// `if expr { block } else { expr }` @@ -2092,6 +2092,10 @@ pub enum TyKind { Never, /// A tuple (`(A, B, C, D,...)`). Tup(ThinVec<P<Ty>>), + /// An anonymous struct type i.e. `struct { foo: Type }` + AnonStruct(ThinVec<FieldDef>), + /// An anonymous union type i.e. `union { bar: Type }` + AnonUnion(ThinVec<FieldDef>), /// A path (`module::module::...::Type`), optionally /// "qualified", e.g., `<Vec<T> as SomeTrait>::SomeType`. /// |