Repository: rust-analyzer/rust-analyzer
Pull request #5628 (2020-07-31 16:32:52)

Rename test modules


Patch:
diff --git a/crates/ra_assists/src/ast_transform.rs b/crates/ra_assists/src/ast_transform.rs
index 3265bd4069..5ea4f9f5ba 100644
--- a/crates/ra_assists/src/ast_transform.rs
+++ b/crates/ra_assists/src/ast_transform.rs
@@ -32,7 +32,7 @@ impl<'a> AstTransform<'a> for NullTransformer {
 
 pub struct SubstituteTypeParams<'a> {
     source_scope: &'a SemanticsScope<'a>,
-    substs: FxHashMap<hir::TypeParam, ast::Type>,
+    substs: FxHashMap<hir::TypeParam, ast::TypeRef>,
     previous: Box<dyn AstTransform<'a> + 'a>,
 }
 
@@ -80,17 +80,17 @@ impl<'a> SubstituteTypeParams<'a> {
 
         // FIXME: It would probably be nicer if we could get this via HIR (i.e. get the
         // trait ref, and then go from the types in the substs back to the syntax)
-        fn get_syntactic_substs(impl_def: ast::Impl) -> Option<Vec<ast::Type>> {
+        fn get_syntactic_substs(impl_def: ast::Impl) -> Option<Vec<ast::TypeRef>> {
             let target_trait = impl_def.target_trait()?;
             let path_type = match target_trait {
-                ast::Type::PathType(path) => path,
+                ast::TypeRef::PathType(path) => path,
                 _ => return None,
             };
             let type_arg_list = path_type.path()?.segment()?.type_arg_list()?;
             let mut result = Vec::new();
             for type_arg in type_arg_list.type_args() {
                 let type_arg: ast::TypeArg = type_arg;
-                result.push(type_arg.ty()?);
+                result.push(type_arg.type_ref()?);
             }
             Some(result)
         }
@@ -99,9 +99,9 @@ impl<'a> SubstituteTypeParams<'a> {
         &self,
         node: &ra_syntax::SyntaxNode,
     ) -> Option<ra_syntax::SyntaxNode> {
-        let type_ref = ast::Type::cast(node.clone())?;
+        let type_ref = ast::TypeRef::cast(node.clone())?;
         let path = match &type_ref {
-            ast::Type::PathType(path_type) => path_type.path()?,
+            ast::TypeRef::PathType(path_type) => path_type.path()?,
             _ => return None,
         };
         // FIXME: use `hir::Path::from_src` instead.
diff --git a/crates/ra_assists/src/handlers/add_explicit_type.rs b/crates/ra_assists/src/handlers/add_explicit_type.rs
index d8b0af0f5f..e69f0a89b2 100644
--- a/crates/ra_assists/src/handlers/add_explicit_type.rs
+++ b/crates/ra_assists/src/handlers/add_explicit_type.rs
@@ -46,7 +46,7 @@ pub(crate) fn add_explicit_type(acc: &mut Assists, ctx: &AssistContext) -> Optio
     // and it has no placeholders
     let ascribed_ty = let_stmt.ty();
     if let Some(ty) = &ascribed_ty {
-        if ty.syntax().descendants().find_map(ast::InferType::cast).is_none() {
+        if ty.syntax().descendants().find_map(ast::PlaceholderType::cast).is_none() {
             return None;
         }
     }
diff --git a/crates/ra_assists/src/handlers/change_return_type_to_result.rs b/crates/ra_assists/src/handlers/change_return_type_to_result.rs
index 4b73c41dac..167e162d80 100644
--- a/crates/ra_assists/src/handlers/change_return_type_to_result.rs
+++ b/crates/ra_assists/src/handlers/change_return_type_to_result.rs
@@ -74,7 +74,6 @@ impl TailReturnCollector {
             let expr = match &stmt {
                 ast::Stmt::ExprStmt(stmt) => stmt.expr(),
                 ast::Stmt::LetStmt(stmt) => stmt.initializer(),
-                ast::Stmt::Item(_) => continue,
             };
             if let Some(expr) = &expr {
                 self.handle_exprs(expr, collect_break);
@@ -95,7 +94,6 @@ impl TailReturnCollector {
                         let expr_stmt = match &expr_stmt {
                             ast::Stmt::ExprStmt(stmt) => stmt.expr(),
                             ast::Stmt::LetStmt(stmt) => stmt.initializer(),
-                            ast::Stmt::Item(_) => None,
                         };
                         if let Some(expr) = &expr_stmt {
                             self.handle_exprs(expr, collect_break);
diff --git a/crates/ra_assists/src/handlers/extract_variable.rs b/crates/ra_assists/src/handlers/extract_variable.rs
index cc62db0c44..b925a2884c 100644
--- a/crates/ra_assists/src/handlers/extract_variable.rs
+++ b/crates/ra_assists/src/handlers/extract_variable.rs
@@ -1,7 +1,7 @@
 use ra_syntax::{
     ast::{self, AstNode},
     SyntaxKind::{
-        BLOCK_EXPR, BREAK_EXPR, CLOSURE_EXPR, COMMENT, LOOP_EXPR, MATCH_ARM, PATH_EXPR, RETURN_EXPR,
+        BLOCK_EXPR, BREAK_EXPR, COMMENT, LAMBDA_EXPR, LOOP_EXPR, MATCH_ARM, PATH_EXPR, RETURN_EXPR,
     },
     SyntaxNode,
 };
@@ -148,7 +148,7 @@ impl Anchor {
             }
 
             if let Some(parent) = node.parent() {
-                if parent.kind() == MATCH_ARM || parent.kind() == CLOSURE_EXPR {
+                if parent.kind() == MATCH_ARM || parent.kind() == LAMBDA_EXPR {
                     return Some(Anchor::WrapInBlock(node));
                 }
             }
diff --git a/crates/ra_assists/src/handlers/generate_from_impl_for_enum.rs b/crates/ra_assists/src/handlers/generate_from_impl_for_enum.rs
index 4c1aef8a21..9da23640a6 100644
--- a/crates/ra_assists/src/handlers/generate_from_impl_for_enum.rs
+++ b/crates/ra_assists/src/handlers/generate_from_impl_for_enum.rs
@@ -34,7 +34,7 @@ pub(crate) fn generate_from_impl_for_enum(acc: &mut Assists, ctx: &AssistContext
     }
     let field_type = field_list.fields().next()?.ty()?;
     let path = match field_type {
-        ast::Type::PathType(it) => it,
+        ast::TypeRef::PathType(it) => it,
         _ => return None,
     };
 
diff --git a/crates/ra_assists/src/handlers/introduce_named_lifetime.rs b/crates/ra_assists/src/handlers/introduce_named_lifetime.rs
index 4537c73a19..c3134f64d0 100644
--- a/crates/ra_assists/src/handlers/introduce_named_lifetime.rs
+++ b/crates/ra_assists/src/handlers/introduce_named_lifetime.rs
@@ -68,7 +68,7 @@ fn generate_fn_def_assist(
         let fn_params_without_lifetime: Vec<_> = param_list
             .params()
             .filter_map(|param| match param.ty() {
-                Some(ast::Type::ReferenceType(ascribed_type))
+                Some(ast::TypeRef::ReferenceType(ascribed_type))
                     if ascribed_type.lifetime_token() == None =>
                 {
                     Some(ascribed_type.amp_token()?.text_range().end())
diff --git a/crates/ra_assists/src/handlers/raw_string.rs b/crates/ra_assists/src/handlers/raw_string.rs
index 4e8a0c2db6..4c797178f1 100644
--- a/crates/ra_assists/src/handlers/raw_string.rs
+++ b/crates/ra_assists/src/handlers/raw_string.rs
@@ -173,7 +173,7 @@ fn test_required_hashes() {
 }
 
 #[cfg(test)]
-mod test {
+mod tests {
     use test_utils::mark;
 
     use crate::tests::{check_assist, check_assist_not_applicable, check_assist_target};
diff --git a/crates/ra_hir_def/src/body/lower.rs b/crates/ra_hir_def/src/body/lower.rs
index 99d7234025..827ced4ad2 100644
--- a/crates/ra_hir_def/src/body/lower.rs
+++ b/crates/ra_hir_def/src/body/lower.rs
@@ -10,7 +10,7 @@ use hir_expand::{
 use ra_arena::Arena;
 use ra_syntax::{
     ast::{
-        self, ArgListOwner, ArrayExprKind, LiteralKind, LoopBodyOwner, NameOwner,
+        self, ArgListOwner, ArrayExprKind, LiteralKind, LoopBodyOwner, ModuleItemOwner, NameOwner,
         SlicePatComponents,
     },
     AstNode, AstPtr,
@@ -224,22 +224,9 @@ impl ExprCollector<'_> {
                     self.alloc_expr(Expr::Unsafe { body }, syntax_ptr)
                 }
                 // FIXME: we need to record these effects somewhere...
-                ast::Effect::Label(label) => match e.block_expr() {
-                    Some(block) => {
-                        let res = self.collect_block(block);
-                        match &mut self.body.exprs[res] {
-                            Expr::Block { label: block_label, .. } => {
-                                *block_label =
-                                    label.lifetime_token().map(|t| Name::new_lifetime(&t))
-                            }
-                            _ => unreachable!(),
-                        }
-                        res
-                    }
-                    None => self.missing_expr(),
-                },
-                // FIXME: we need to record these effects somewhere...
-                ast::Effect::Async(_) => self.collect_block_opt(e.block_expr()),
+                ast::Effect::Async(_) | ast::Effect::Label(_) => {
+                    self.collect_block_opt(e.block_expr())
+                }
             },
             ast::Expr::BlockExpr(e) => self.collect_block(e),
             ast::Expr::LoopExpr(e) => {
@@ -473,7 +460,7 @@ impl ExprCollector<'_> {
                     self.alloc_expr(Expr::Missing, syntax_ptr)
                 }
             }
-            ast::Expr::ClosureExpr(e) => {
+            ast::Expr::LambdaExpr(e) => {
                 let mut args = Vec::new();
                 let mut arg_types = Vec::new();
                 if let Some(pl) = e.param_list() {
@@ -614,35 +601,26 @@ impl ExprCollector<'_> {
         self.collect_block_items(&block);
         let statements = block
             .statements()
-            .filter_map(|s| {
-                let stmt = match s {
-                    ast::Stmt::LetStmt(stmt) => {
-                        let pat = self.collect_pat_opt(stmt.pat());
-                        let type_ref = stmt.ty().map(|it| TypeRef::from_ast(&self.ctx(), it));
-                        let initializer = stmt.initializer().map(|e| self.collect_expr(e));
-                        Statement::Let { pat, type_ref, initializer }
-                    }
-                    ast::Stmt::ExprStmt(stmt) => {
-                        Statement::Expr(self.collect_expr_opt(stmt.expr()))
-                    }
-                    ast::Stmt::Item(_) => return None,
-                };
-                Some(stmt)
+            .map(|s| match s {
+                ast::Stmt::LetStmt(stmt) => {
+                    let pat = self.collect_pat_opt(stmt.pat());
+                    let type_ref = stmt.ty().map(|it| TypeRef::from_ast(&self.ctx(), it));
+                    let initializer = stmt.initializer().map(|e| self.collect_expr(e));
+                    Statement::Let { pat, type_ref, initializer }
+                }
+                ast::Stmt::ExprStmt(stmt) => Statement::Expr(self.collect_expr_opt(stmt.expr())),
             })
             .collect();
         let tail = block.expr().map(|e| self.collect_expr(e));
-        self.alloc_expr(Expr::Block { statements, tail, label: None }, syntax_node_ptr)
+        let label = block.label().and_then(|l| l.lifetime_token()).map(|t| Name::new_lifetime(&t));
+        self.alloc_expr(Expr::Block { statements, tail, label }, syntax_node_ptr)
     }
 
     fn collect_block_items(&mut self, block: &ast::BlockExpr) {
         let container = ContainerId::DefWithBodyId(self.def);
 
         let items = block
-            .statements()
-            .filter_map(|stmt| match stmt {
-                ast::Stmt::Item(it) => Some(it),
-                ast::Stmt::LetStmt(_) | ast::Stmt::ExprStmt(_) => None,
-            })
+            .items()
             .filter_map(|item| {
                 let (def, name): (ModuleDefId, Option<ast::Name>) = match item {
                     ast::Item::Fn(def) => {
diff --git a/crates/ra_hir_def/src/generics.rs b/crates/ra_hir_def/src/generics.rs
index 699ba9c923..8ea61fcf23 100644
--- a/crates/ra_hir_def/src/generics.rs
+++ b/crates/ra_hir_def/src/generics.rs
@@ -253,7 +253,7 @@ impl GenericParams {
 
     fn fill_where_predicates(&mut self, lower_ctx: &LowerCtx, where_clause: ast::WhereClause) {
         for pred in where_clause.predicates() {
-            let type_ref = match pred.ty() {
+            let type_ref = match pred.type_ref() {
                 Some(type_ref) => type_ref,
                 None => continue,
             };
@@ -270,7 +270,7 @@ impl GenericParams {
         bound: ast::TypeBound,
         type_ref: TypeRef,
     ) {
-        if bound.question_mark_token().is_some() {
+        if bound.question_token().is_some() {
             // FIXME: remove this bound
             return;
         }
diff --git a/crates/ra_hir_def/src/item_tree/lower.rs b/crates/ra_hir_def/src/item_tree/lower.rs
index b5d416acbc..feb31579e5 100644
--- a/crates/ra_hir_def/src/item_tree/lower.rs
+++ b/crates/ra_hir_def/src/item_tree/lower.rs
@@ -648,10 +648,10 @@ impl Ctx {
         self.data().vis.alloc(vis)
     }
 
-    fn lower_type_ref(&self, type_ref: &ast::Type) -> TypeRef {
+    fn lower_type_ref(&self, type_ref: &ast::TypeRef) -> TypeRef {
         TypeRef::from_ast(&self.body_ctx, type_ref.clone())
     }
-    fn lower_type_ref_opt(&self, type_ref: Option<ast::Type>) -> TypeRef {
+    fn lower_type_ref_opt(&self, type_ref: Option<ast::TypeRef>) -> TypeRef {
         type_ref.map(|ty| self.lower_type_ref(&ty)).unwrap_or(TypeRef::Error)
     }
 
diff --git a/crates/ra_hir_def/src/path/lower.rs b/crates/ra_hir_def/src/path/lower.rs
index 257f9a033c..07d17916ae 100644
--- a/crates/ra_hir_def/src/path/lower.rs
+++ b/crates/ra_hir_def/src/path/lower.rs
@@ -152,7 +152,7 @@ pub(super) fn lower_generic_args(
 ) -> Option<GenericArgs> {
     let mut args = Vec::new();
     for type_arg in node.type_args() {
-        let type_ref = TypeRef::from_ast_opt(lower_ctx, type_arg.ty());
+        let type_ref = TypeRef::from_ast_opt(lower_ctx, type_arg.type_ref());
         args.push(GenericArg::Type(type_ref));
     }
     // lifetimes ignored for now
@@ -161,7 +161,7 @@ pub(super) fn lower_generic_args(
         let assoc_type_arg: ast::AssocTypeArg = assoc_type_arg;
         if let Some(name_ref) = assoc_type_arg.name_ref() {
             let name = name_ref.as_name();
-            let type_ref = assoc_type_arg.ty().map(|it| TypeRef::from_ast(lower_ctx, it));
+            let type_ref = assoc_type_arg.type_ref().map(|it| TypeRef::from_ast(lower_ctx, it));
             let bounds = if let Some(l) = assoc_type_arg.type_bound_list() {
                 l.bounds().map(|it| TypeBound::from_ast(lower_ctx, it)).collect()
             } else {
diff --git a/crates/ra_hir_def/src/type_ref.rs b/crates/ra_hir_def/src/type_ref.rs
index fe6619d9f4..a5dc10eac5 100644
--- a/crates/ra_hir_def/src/type_ref.rs
+++ b/crates/ra_hir_def/src/type_ref.rs
@@ -1,5 +1,6 @@
 //! HIR for references to types. Paths in these are not yet resolved. They can
 //! be directly created from an ast::TypeRef, without further queries.
+
 use ra_syntax::ast::{self};
 
 use crate::{body::LowerCtx, path::Path};
@@ -79,14 +80,14 @@ pub enum TypeBound {
 
 impl TypeRef {
     /// Converts an `ast::TypeRef` to a `hir::TypeRef`.
-    pub(crate) fn from_ast(ctx: &LowerCtx, node: ast::Type) -> Self {
+    pub(crate) fn from_ast(ctx: &LowerCtx, node: ast::TypeRef) -> Self {
         match node {
-            ast::Type::ParenType(inner) => TypeRef::from_ast_opt(&ctx, inner.ty()),
-            ast::Type::TupleType(inner) => {
+            ast::TypeRef::ParenType(inner) => TypeRef::from_ast_opt(&ctx, inner.ty()),
+            ast::TypeRef::TupleType(inner) => {
                 TypeRef::Tuple(inner.fields().map(|it| TypeRef::from_ast(ctx, it)).collect())
             }
-            ast::Type::NeverType(..) => TypeRef::Never,
-            ast::Type::PathType(inner) => {
+            ast::TypeRef::NeverType(..) => TypeRef::Never,
+            ast::TypeRef::PathType(inner) => {
                 // FIXME: Use `Path::from_src`
                 inner
                     .path()
@@ -94,24 +95,24 @@ impl TypeRef {
                     .map(TypeRef::Path)
                     .unwrap_or(TypeRef::Error)
             }
-            ast::Type::PointerType(inner) => {
+            ast::TypeRef::PointerType(inner) => {
                 let inner_ty = TypeRef::from_ast_opt(&ctx, inner.ty());
                 let mutability = Mutability::from_mutable(inner.mut_token().is_some());
                 TypeRef::RawPtr(Box::new(inner_ty), mutability)
             }
-            ast::Type::ArrayType(inner) => {
+            ast::TypeRef::ArrayType(inner) => {
                 TypeRef::Array(Box::new(TypeRef::from_ast_opt(&ctx, inner.ty())))
             }
-            ast::Type::SliceType(inner) => {
+            ast::TypeRef::SliceType(inner) => {
                 TypeRef::Slice(Box::new(TypeRef::from_ast_opt(&ctx, inner.ty())))
             }
-            ast::Type::ReferenceType(inner) => {
+            ast::TypeRef::ReferenceType(inner) => {
                 let inner_ty = TypeRef::from_ast_opt(&ctx, inner.ty());
                 let mutability = Mutability::from_mutable(inner.mut_token().is_some());
                 TypeRef::Reference(Box::new(inner_ty), mutability)
             }
-            ast::Type::InferType(_inner) => TypeRef::Placeholder,
-            ast::Type::FnPointerType(inner) => {
+            ast::TypeRef::PlaceholderType(_inner) => TypeRef::Placeholder,
+            ast::TypeRef::FnPointerType(inner) => {
                 let ret_ty = inner
                     .ret_type()
                     .and_then(|rt| rt.ty())
@@ -131,17 +132,17 @@ impl TypeRef {
                 TypeRef::Fn(params, is_varargs)
             }
             // for types are close enough for our purposes to the inner type for now...
-            ast::Type::ForType(inner) => TypeRef::from_ast_opt(&ctx, inner.ty()),
-            ast::Type::ImplTraitType(inner) => {
+            ast::TypeRef::ForType(inner) => TypeRef::from_ast_opt(&ctx, inner.ty()),
+            ast::TypeRef::ImplTraitType(inner) => {
                 TypeRef::ImplTrait(type_bounds_from_ast(ctx, inner.type_bound_list()))
             }
-            ast::Type::DynTraitType(inner) => {
+            ast::TypeRef::DynTraitType(inner) => {
                 TypeRef::DynTrait(type_bounds_from_ast(ctx, inner.type_bound_list()))
             }
         }
     }
 
-    pub(crate) fn from_ast_opt(ctx: &LowerCtx, node: Option<ast::Type>) -> Self {
+    pub(crate) fn from_ast_opt(ctx: &LowerCtx, node: Option<ast::TypeRef>) -> Self {
         if let Some(node) = node {
             TypeRef::from_ast(ctx, node)
         } else {
diff --git a/crates/ra_hir_expand/src/db.rs b/crates/ra_hir_expand/src/db.rs
index f3b7cd492c..41df666965 100644
--- a/crates/ra_hir_expand/src/db.rs
+++ b/crates/ra_hir_expand/src/db.rs
@@ -379,7 +379,7 @@ fn to_fragment_kind(db: &dyn AstDatabase, id: MacroCallId) -> FragmentKind {
 
         FOR_EXPR => FragmentKind::Expr,
         PATH_EXPR => FragmentKind::Expr,
-        CLOSURE_EXPR => FragmentKind::Expr,
+        LAMBDA_EXPR => FragmentKind::Expr,
         CONDITION => FragmentKind::Expr,
         BREAK_EXPR => FragmentKind::Expr,
         RETURN_EXPR => FragmentKind::Expr,
diff --git a/crates/ra_hir_expand/src/proc_macro.rs b/crates/ra_hir_expand/src/proc_macro.rs
index 04c0260046..2c0ec41d24 100644
--- a/crates/ra_hir_expand/src/proc_macro.rs
+++ b/crates/ra_hir_expand/src/proc_macro.rs
@@ -101,7 +101,7 @@ fn remove_derive_attrs(tt: &tt::Subtree) -> Option<tt::Subtree> {
 }
 
 #[cfg(test)]
-mod test {
+mod tests {
     use super::*;
     use test_utils::assert_eq_text;
 
diff --git a/crates/ra_ide/src/completion/patterns.rs b/crates/ra_ide/src/completion/patterns.rs
index 9e654b373c..a68861e1c9 100644
--- a/crates/ra_ide/src/completion/patterns.rs
+++ b/crates/ra_ide/src/completion/patterns.rs
@@ -134,7 +134,7 @@ pub(crate) fn is_in_loop_body(element: SyntaxElement) -> bool {
         NodeOrToken::Token(token) => token.parent(),
     };
     for node in leaf.ancestors() {
-        if node.kind() == FN || node.kind() == CLOSURE_EXPR {
+        if node.kind() == FN || node.kind() == LAMBDA_EXPR {
             break;
         }
         let loop_body = match_ast! {
diff --git a/crates/ra_ide/src/display/short_label.rs b/crates/ra_ide/src/display/short_label.rs
index 0fdf8e9a58..bddf1bd474 100644
--- a/crates/ra_ide/src/display/short_label.rs
+++ b/crates/ra_ide/src/display/short_label.rs
@@ -77,7 +77,7 @@ impl ShortLabel for ast::Variant {
     }
 }
 
-fn short_label_from_ty<T>(node: &T, ty: Option<ast::Type>, prefix: &str) -> Option<String>
+fn short_label_from_ty<T>(node: &T, ty: Option<ast::TypeRef>, prefix: &str) -> Option<String>
 where
     T: NameOwner + VisibilityOwner,
 {
diff --git a/crates/ra_ide/src/file_structure.rs b/crates/ra_ide/src/file_structure.rs
index ef368651ae..91765140a4 100644
--- a/crates/ra_ide/src/file_structure.rs
+++ b/crates/ra_ide/src/file_structure.rs
@@ -57,7 +57,7 @@ fn structure_node(node: &SyntaxNode) -> Option<StructureNode> {
 
     fn decl_with_type_ref<N: NameOwner + AttrsOwner>(
         node: &N,
-        type_ref: Option<ast::Type>,
+        type_ref: Option<ast::TypeRef>,
     ) -> Option<StructureNode> {
         let detail = type_ref.map(|type_ref| {
             let mut detail = String::new();
diff --git a/crates/ra_ide/src/references/rename.rs b/crates/ra_ide/src/references/rename.rs
index 96aed7cc73..31654bf791 100644
--- a/crates/ra_ide/src/references/rename.rs
+++ b/crates/ra_ide/src/references/rename.rs
@@ -157,7 +157,7 @@ fn rename_to_self(
     }
     let first_param = params.params().next()?;
     let mutable = match first_param.ty() {
-        Some(ast::Type::ReferenceType(rt)) => rt.mut_token().is_some(),
+        Some(ast::TypeRef::ReferenceType(rt)) => rt.mut_token().is_some(),
         _ => return None, // not renaming other types
     };
 
@@ -194,7 +194,7 @@ fn text_edit_from_self_param(
     new_name: &str,
 ) -> Option<TextEdit> {
     fn target_type_name(impl_def: &ast::Impl) -> Option<String> {
-        if let Some(ast::Type::PathType(p)) = impl_def.target_type() {
+        if let Some(ast::TypeRef::PathType(p)) = impl_def.target_type() {
             return Some(p.path()?.segment()?.name_ref()?.text().to_string());
         }
         None
diff --git a/crates/ra_parser/src/grammar/expressions/atom.rs b/crates/ra_parser/src/grammar/expressions/atom.rs
index 0b01d3bc64..706a2f796b 100644
--- a/crates/ra_parser/src/grammar/expressions/atom.rs
+++ b/crates/ra_parser/src/grammar/expressions/atom.rs
@@ -250,7 +250,7 @@ fn lambda_expr(p: &mut Parser) -> CompletedMarker {
             p.error("expected expression");
         }
     }
-    m.complete(p, CLOSURE_EXPR)
+    m.complete(p, LAMBDA_EXPR)
 }
 
 // test if_expr
diff --git a/crates/ra_parser/src/grammar/types.rs b/crates/ra_parser/src/grammar/types.rs
index e9a20fbf1e..9e8e3bd97f 100644
--- a/crates/ra_parser/src/grammar/types.rs
+++ b/crates/ra_parser/src/grammar/types.rs
@@ -172,7 +172,7 @@ fn placeholder_type(p: &mut Parser) {
     assert!(p.at(T![_]));
     let m = p.start();
     p.bump(T![_]);
-    m.complete(p, INFER_TYPE);
+    m.complete(p, PLACEHOLDER_TYPE);
 }
 
 // test fn_pointer_type
diff --git a/crates/ra_parser/src/syntax_kind/generated.rs b/crates/ra_parser/src/syntax_kind/generated.rs
index 2830c0d74b..be4da67bcb 100644
--- a/crates/ra_parser/src/syntax_kind/generated.rs
+++ b/crates/ra_parser/src/syntax_kind/generated.rs
@@ -147,7 +147,7 @@ pub enum SyntaxKind {
     ARRAY_TYPE,
     SLICE_TYPE,
     REFERENCE_TYPE,
-    INFER_TYPE,
+    PLACEHOLDER_TYPE,
     FN_POINTER_TYPE,
     FOR_TYPE,
     IMPL_TRAIT_TYPE,
@@ -173,7 +173,7 @@ pub enum SyntaxKind {
     ARRAY_EXPR,
     PAREN_EXPR,
     PATH_EXPR,
-    CLOSURE_EXPR,
+    LAMBDA_EXPR,
     IF_EXPR,
     WHILE_EXPR,
     CONDITION,
diff --git a/crates/ra_ssr/src/parsing.rs b/crates/ra_ssr/src/parsing.rs
index 4e046910c5..78e03f394b 100644
--- a/crates/ra_ssr/src/parsing.rs
+++ b/crates/ra_ssr/src/parsing.rs
@@ -70,7 +70,7 @@ impl ParsedRule {
             rules: Vec::new(),
         };
         builder.try_add(ast::Expr::parse(&raw_pattern), raw_template.map(ast::Expr::parse));
-        builder.try_add(ast::Type::parse(&raw_pattern), raw_template.map(ast::Type::parse));
+        builder.try_add(ast::TypeRef::parse(&raw_pattern), raw_template.map(ast::TypeRef::parse));
         builder.try_add(ast::Item::parse(&raw_pattern), raw_template.map(ast::Item::parse));
         builder.try_add(ast::Path::parse(&raw_pattern), raw_template.map(ast::Path::parse));
         builder.try_add(ast::Pat::parse(&raw_pattern), raw_template.map(ast::Pat::parse));
diff --git a/crates/ra_syntax/src/ast.rs b/crates/ra_syntax/src/ast.rs
index d536bb1e7d..fd426ece9d 100644
--- a/crates/ra_syntax/src/ast.rs
+++ b/crates/ra_syntax/src/ast.rs
@@ -17,7 +17,7 @@ use crate::{
 
 pub use self::{
     expr_ext::{ArrayExprKind, BinOp, Effect, ElseBranch, LiteralKind, PrefixOp, RangeOp},
-    generated::*,
+    generated::{nodes::*, tokens::*},
     node_ext::{
         AttrKind, FieldKind, NameOrNameRef, PathSegmentKind, SelfParamKind, SlicePatComponents,
         StructKind, TypeBoundKind, VisibilityKind,
@@ -287,7 +287,7 @@ where
 
     assert!(pred.for_token().is_none());
     assert!(pred.generic_param_list().is_none());
-    assert_eq!("T", pred.ty().unwrap().syntax().text().to_string());
+    assert_eq!("T", pred.type_ref().unwrap().syntax().text().to_string());
     assert_bound("Clone", bounds.next());
     assert_bound("Copy", bounds.next());
     assert_bound("Debug", bounds.next());
@@ -304,20 +304,20 @@ where
     let pred = predicates.next().unwrap();
     let mut bounds = pred.type_bound_list().unwrap().bounds();
 
-    assert_eq!("Iterator::Item", pred.ty().unwrap().syntax().text().to_string());
+    assert_eq!("Iterator::Item", pred.type_ref().unwrap().syntax().text().to_string());
     assert_bound("'a", bounds.next());
 
     let pred = predicates.next().unwrap();
     let mut bounds = pred.type_bound_list().unwrap().bounds();
 
-    assert_eq!("Iterator::Item", pred.ty().unwrap().syntax().text().to_string());
+    assert_eq!("Iterator::Item", pred.type_ref().unwrap().syntax().text().to_string());
     assert_bound("Debug", bounds.next());
     assert_bound("'a", bounds.next());
 
     let pred = predicates.next().unwrap();
     let mut bounds = pred.type_bound_list().unwrap().bounds();
 
-    assert_eq!("<T as Iterator>::Item", pred.ty().unwrap().syntax().text().to_string());
+    assert_eq!("<T as Iterator>::Item", pred.type_ref().unwrap().syntax().text().to_string());
     assert_bound("Debug", bounds.next());
     assert_bound("'a", bounds.next());
 
@@ -326,6 +326,6 @@ where
 
     assert!(pred.for_token().is_some());
     assert_eq!("<'a>", pred.generic_param_list().unwrap().syntax().text().to_string());
-    assert_eq!("F", pred.ty().unwrap().syntax().text().to_string());
+    assert_eq!("F", pred.type_ref().unwrap().syntax().text().to_string());
     assert_bound("Fn(&'a str)", bounds.next());
 }
diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs
index 4a6f41ee71..f5199e09f2 100644
--- a/crates/ra_syntax/src/ast/generated.rs
+++ b/crates/ra_syntax/src/ast/generated.rs
@@ -1,41 +1,6 @@
 //! This file is actually hand-written, but the submodules are indeed generated.
+
 #[rustfmt::skip]
-mod nodes;
+pub(super) mod nodes;
 #[rustfmt::skip]
-mod tokens;
-
-use crate::{
-    AstNode,
-    SyntaxKind::{self, *},
-    SyntaxNode,
-};
-
-pub use {nodes::*, tokens::*};
-
-// Stmt is the only nested enum, so it's easier to just hand-write it
-impl AstNode for Stmt {
-    fn can_cast(kind: SyntaxKind) -> bool {
-        match kind {
-            LET_STMT | EXPR_STMT => true,
-            _ => Item::can_cast(kind),
-        }
-    }
-    fn cast(syntax: SyntaxNode) -> Option<Self> {
-        let res = match syntax.kind() {
-            LET_STMT => Stmt::LetStmt(LetStmt { syntax }),
-            EXPR_STMT => Stmt::ExprStmt(ExprStmt { syntax }),
-            _ => {
-                let item = Item::cast(syntax)?;
-                Stmt::Item(item)
-            }
-        };
-        Some(res)
-    }
-    fn syntax(&self) -> &SyntaxNode {
-        match self {
-            Stmt::LetStmt(it) => &it.syntax,
-            Stmt::ExprStmt(it) => &it.syntax,
-            Stmt::Item(it) => it.syntax(),
-        }
-    }
-}
+pub(super) mod tokens;
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs
index 158544fa21..4306efe136 100644
--- a/crates/ra_syntax/src/ast/generated/nodes.rs
+++ b/crates/ra_syntax/src/ast/generated/nodes.rs
@@ -40,7 +40,7 @@ impl Const {
     pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
     pub fn underscore_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![_]) }
     pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
-    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
+    pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) }
     pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
     pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) }
     pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
@@ -112,7 +112,7 @@ impl Impl {
     pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
     pub fn impl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![impl]) }
     pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
-    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
+    pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
     pub fn excl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![!]) }
     pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) }
     pub fn assoc_item_list(&self) -> Option<AssocItemList> { support::child(&self.syntax) }
@@ -152,7 +152,7 @@ impl Static {
     pub fn static_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![static]) }
     pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
     pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
-    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
+    pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) }
     pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
     pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) }
     pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
@@ -198,7 +198,7 @@ impl TypeAlias {
     pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) }
     pub fn type_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![type]) }
     pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
-    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
+    pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) }
     pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -333,7 +333,7 @@ pub struct RetType {
 }
 impl RetType {
     pub fn thin_arrow_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![->]) }
-    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
+    pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
 pub struct WhereClause {
@@ -348,7 +348,9 @@ pub struct BlockExpr {
     pub(crate) syntax: SyntaxNode,
 }
 impl ast::AttrsOwner for BlockExpr {}
+impl ast::ModuleItemOwner for BlockExpr {}
 impl BlockExpr {
+    pub fn label(&self) -> Option<Label> { support::child(&self.syntax) }
     pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
     pub fn statements(&self) -> AstChildren<Stmt> { support::children(&self.syntax) }
     pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
@@ -367,7 +369,7 @@ impl SelfParam {
     pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
     pub fn self_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![self]) }
     pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
-    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
+    pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
 pub struct Param {
@@ -377,7 +379,7 @@ impl ast::AttrsOwner for Param {}
 impl Param {
     pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
     pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
-    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
+    pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) }
     pub fn dotdotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![...]) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -414,7 +416,7 @@ impl ast::NameOwner for RecordField {}
 impl ast::VisibilityOwner for RecordField {}
 impl RecordField {
     pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
-    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
+    pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
 pub struct TupleField {
@@ -423,7 +425,7 @@ pub struct TupleField {
 impl ast::AttrsOwner for TupleField {}
 impl ast::VisibilityOwner for TupleField {}
 impl TupleField {
-    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
+    pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
 pub struct VariantList {
@@ -467,24 +469,10 @@ impl ExternItemList {
     pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct ConstParam {
-    pub(crate) syntax: SyntaxNode,
-}
-impl ast::AttrsOwner for ConstParam {}
-impl ast::NameOwner for ConstParam {}
-impl ConstParam {
-    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
-    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
-    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
-    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
-    pub fn default_val(&self) -> Option<Expr> { support::child(&self.syntax) }
-}
-#[derive(Debug, Clone, PartialEq, Eq, Hash)]
 pub struct LifetimeParam {
     pub(crate) syntax: SyntaxNode,
 }
 impl ast::AttrsOwner for LifetimeParam {}
-impl ast::TypeBoundsOwner for LifetimeParam {}
 impl LifetimeParam {
     pub fn lifetime_token(&self) -> Option<SyntaxToken> {
         support::token(&self.syntax, T![lifetime])
@@ -499,26 +487,25 @@ impl ast::NameOwner for TypeParam {}
 impl ast::TypeBoundsOwner for TypeParam {}
 impl TypeParam {
     pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
-    pub fn default_type(&self) -> Option<Type> { support::child(&self.syntax) }
+    pub fn default_type(&self) -> Option<TypeRef> { support::child(&self.syntax) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct WherePred {
+pub struct ConstParam {
     pub(crate) syntax: SyntaxNode,
 }
-impl ast::TypeBoundsOwner for WherePred {}
-impl WherePred {
-    pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) }
-    pub fn generic_param_list(&self) -> Option<GenericParamList> { support::child(&self.syntax) }
-    pub fn lifetime_token(&self) -> Option<SyntaxToken> {
-        support::token(&self.syntax, T![lifetime])
-    }
-    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
+impl ast::AttrsOwner for ConstParam {}
+impl ast::NameOwner for ConstParam {}
+impl ConstParam {
+    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
+    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
+    pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) }
+    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
+    pub fn default_val(&self) -> Option<Expr> { support::child(&self.syntax) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
 pub struct Literal {
     pub(crate) syntax: SyntaxNode,
 }
-impl ast::AttrsOwner for Literal {}
 impl Literal {}
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
 pub struct TokenTree {
@@ -533,177 +520,167 @@ impl TokenTree {
     pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct ExprStmt {
+pub struct ParenType {
     pub(crate) syntax: SyntaxNode,
 }
-impl ast::AttrsOwner for ExprStmt {}
-impl ExprStmt {
-    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
-    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
+impl ParenType {
+    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
+    pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) }
+    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct LetStmt {
+pub struct TupleType {
     pub(crate) syntax: SyntaxNode,
 }
-impl ast::AttrsOwner for LetStmt {}
-impl LetStmt {
-    pub fn let_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![let]) }
-    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
-    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
-    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
-    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
-    pub fn initializer(&self) -> Option<Expr> { support::child(&self.syntax) }
-    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
+impl TupleType {
+    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
+    pub fn fields(&self) -> AstChildren<TypeRef> { support::children(&self.syntax) }
+    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct ArrayExpr {
+pub struct NeverType {
     pub(crate) syntax: SyntaxNode,
 }
-impl ast::AttrsOwner for ArrayExpr {}
-impl ArrayExpr {
-    pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
-    pub fn exprs(&self) -> AstChildren<Expr> { support::children(&self.syntax) }
-    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
-    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
-    pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
+impl NeverType {
+    pub fn excl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![!]) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct AwaitExpr {
+pub struct PathType {
     pub(crate) syntax: SyntaxNode,
 }
-impl ast::AttrsOwner for AwaitExpr {}
-impl AwaitExpr {
-    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
-    pub fn dot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![.]) }
-    pub fn await_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![await]) }
+impl PathType {
+    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct BinExpr {
+pub struct PointerType {
     pub(crate) syntax: SyntaxNode,
 }
-impl ast::AttrsOwner for BinExpr {}
-impl BinExpr {}
+impl PointerType {
+    pub fn star_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![*]) }
+    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
+    pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
+    pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) }
+}
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct BoxExpr {
+pub struct ArrayType {
     pub(crate) syntax: SyntaxNode,
 }
-impl ast::AttrsOwner for BoxExpr {}
-impl BoxExpr {
-    pub fn box_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![box]) }
+impl ArrayType {
+    pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
+    pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) }
+    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
     pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
+    pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct BreakExpr {
+pub struct SliceType {
     pub(crate) syntax: SyntaxNode,
 }
-impl ast::AttrsOwner for BreakExpr {}
-impl BreakExpr {
-    pub fn break_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![break]) }
+impl SliceType {
+    pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
+    pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) }
+    pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
+}
+#[derive(Debug, Clone, PartialEq, Eq, Hash)]
+pub struct ReferenceType {
+    pub(crate) syntax: SyntaxNode,
+}
+impl ReferenceType {
+    pub fn amp_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![&]) }
     pub fn lifetime_token(&self) -> Option<SyntaxToken> {
         support::token(&self.syntax, T![lifetime])
     }
-    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
+    pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
+    pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct CallExpr {
+pub struct PlaceholderType {
     pub(crate) syntax: SyntaxNode,
 }
-impl ast::AttrsOwner for CallExpr {}
-impl ast::ArgListOwner for CallExpr {}
-impl CallExpr {
-    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
+impl PlaceholderType {
+    pub fn underscore_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![_]) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct CastExpr {
+pub struct FnPointerType {
     pub(crate) syntax: SyntaxNode,
 }
-impl ast::AttrsOwner for CastExpr {}
-impl CastExpr {
-    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
-    pub fn as_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![as]) }
-    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
+impl FnPointerType {
+    pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) }
+    pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
+    pub fn fn_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![fn]) }
+    pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) }
+    pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct ContinueExpr {
+pub struct ForType {
     pub(crate) syntax: SyntaxNode,
 }
-impl ast::AttrsOwner for ContinueExpr {}
-impl ContinueExpr {
-    pub fn continue_token(&self) -> Option<SyntaxToken> {
-        support::token(&self.syntax, T![continue])
-    }
-    pub fn lifetime_token(&self) -> Option<SyntaxToken> {
-        support::token(&self.syntax, T![lifetime])
-    }
+impl ForType {
+    pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) }
+    pub fn generic_param_list(&self) -> Option<GenericParamList> { support::child(&self.syntax) }
+    pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct EffectExpr {
+pub struct ImplTraitType {
     pub(crate) syntax: SyntaxNode,
 }
-impl ast::AttrsOwner for EffectExpr {}
-impl EffectExpr {
-    pub fn label(&self) -> Option<Label> { support::child(&self.syntax) }
-    pub fn try_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![try]) }
-    pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
-    pub fn async_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![async]) }
-    pub fn block_expr(&self) -> Option<BlockExpr> { support::child(&self.syntax) }
+impl ImplTraitType {
+    pub fn impl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![impl]) }
+    pub fn type_bound_list(&self) -> Option<TypeBoundList> { support::child(&self.syntax) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct FieldExpr {
+pub struct DynTraitType {
     pub(crate) syntax: SyntaxNode,
 }
-impl ast::AttrsOwner for FieldExpr {}
-impl FieldExpr {
-    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
-    pub fn dot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![.]) }
-    pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
+impl DynTraitType {
+    pub fn dyn_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![dyn]) }
+    pub fn type_bound_list(&self) -> Option<TypeBoundList> { support::child(&self.syntax) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct ForExpr {
+pub struct TupleExpr {
     pub(crate) syntax: SyntaxNode,
 }
-impl ast::AttrsOwner for ForExpr {}
-impl ast::LoopBodyOwner for ForExpr {}
-impl ForExpr {
-    pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) }
-    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
-    pub fn in_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![in]) }
-    pub fn iterable(&self) -> Option<Expr> { support::child(&self.syntax) }
+impl ast::AttrsOwner for TupleExpr {}
+impl TupleExpr {
+    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
+    pub fn exprs(&self) -> AstChildren<Expr> { support::children(&self.syntax) }
+    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct IfExpr {
+pub struct ArrayExpr {
     pub(crate) syntax: SyntaxNode,
 }
-impl ast::AttrsOwner for IfExpr {}
-impl IfExpr {
-    pub fn if_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![if]) }
-    pub fn condition(&self) -> Option<Condition> { support::child(&self.syntax) }
-    pub fn else_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![else]) }
+impl ast::AttrsOwner for ArrayExpr {}
+impl ArrayExpr {
+    pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
+    pub fn exprs(&self) -> AstChildren<Expr> { support::children(&self.syntax) }
+    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
+    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
+    pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct IndexExpr {
+pub struct ParenExpr {
     pub(crate) syntax: SyntaxNode,
 }
-impl ast::AttrsOwner for IndexExpr {}
-impl IndexExpr {
-    pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
-    pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
+impl ast::AttrsOwner for ParenExpr {}
+impl ParenExpr {
+    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
+    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
+    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct Label {
+pub struct PathExpr {
     pub(crate) syntax: SyntaxNode,
 }
-impl Label {
-    pub fn lifetime_token(&self) -> Option<SyntaxToken> {
-        support::token(&self.syntax, T![lifetime])
-    }
+impl PathExpr {
+    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct ClosureExpr {
+pub struct LambdaExpr {
     pub(crate) syntax: SyntaxNode,
 }
-impl ast::AttrsOwner for ClosureExpr {}
-impl ClosureExpr {
+impl ast::AttrsOwner for LambdaExpr {}
+impl LambdaExpr {
     pub fn static_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![static]) }
     pub fn async_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![async]) }
     pub fn move_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![move]) }
@@ -712,88 +689,99 @@ impl ClosureExpr {
     pub fn body(&self) -> Option<Expr> { support::child(&self.syntax) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct LoopExpr {
+pub struct IfExpr {
     pub(crate) syntax: SyntaxNode,
 }
-impl ast::AttrsOwner for LoopExpr {}
-impl ast::LoopBodyOwner for LoopExpr {}
-impl LoopExpr {
-    pub fn loop_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![loop]) }
+impl ast::AttrsOwner for IfExpr {}
+impl IfExpr {
+    pub fn if_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![if]) }
+    pub fn condition(&self) -> Option<Condition> { support::child(&self.syntax) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct MatchExpr {
+pub struct Condition {
     pub(crate) syntax: SyntaxNode,
 }
-impl ast::AttrsOwner for MatchExpr {}
-impl MatchExpr {
-    pub fn match_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![match]) }
+impl Condition {
+    pub fn let_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![let]) }
+    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
+    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
     pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
-    pub fn match_arm_list(&self) -> Option<MatchArmList> { support::child(&self.syntax) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct MethodCallExpr {
+pub struct EffectExpr {
     pub(crate) syntax: SyntaxNode,
 }
-impl ast::AttrsOwner for MethodCallExpr {}
-impl ast::ArgListOwner for MethodCallExpr {}
-impl MethodCallExpr {
-    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
-    pub fn dot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![.]) }
-    pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
-    pub fn type_arg_list(&self) -> Option<TypeArgList> { support::child(&self.syntax) }
+impl ast::AttrsOwner for EffectExpr {}
+impl EffectExpr {
+    pub fn label(&self) -> Option<Label> { support::child(&self.syntax) }
+    pub fn try_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![try]) }
+    pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
+    pub fn async_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![async]) }
+    pub fn block_expr(&self) -> Option<BlockExpr> { support::child(&self.syntax) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct ParenExpr {
+pub struct Label {
     pub(crate) syntax: SyntaxNode,
 }
-impl ast::AttrsOwner for ParenExpr {}
-impl ParenExpr {
-    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
-    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
-    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
+impl Label {
+    pub fn lifetime_token(&self) -> Option<SyntaxToken> {
+        support::token(&self.syntax, T![lifetime])
+    }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct PathExpr {
+pub struct LoopExpr {
     pub(crate) syntax: SyntaxNode,
 }
-impl ast::AttrsOwner for PathExpr {}
-impl PathExpr {
-    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
+impl ast::AttrsOwner for LoopExpr {}
+impl ast::LoopBodyOwner for LoopExpr {}
+impl LoopExpr {
+    pub fn loop_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![loop]) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct PrefixExpr {
+pub struct ForExpr {
     pub(crate) syntax: SyntaxNode,
 }
-impl ast::AttrsOwner for PrefixExpr {}
-impl PrefixExpr {
-    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
+impl ast::AttrsOwner for ForExpr {}
+impl ast::LoopBodyOwner for ForExpr {}
+impl ForExpr {
+    pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) }
+    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
+    pub fn in_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![in]) }
+    pub fn iterable(&self) -> Option<Expr> { support::child(&self.syntax) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct RangeExpr {
+pub struct WhileExpr {
     pub(crate) syntax: SyntaxNode,
 }
-impl ast::AttrsOwner for RangeExpr {}
-impl RangeExpr {}
+impl ast::AttrsOwner for WhileExpr {}
+impl ast::LoopBodyOwner for WhileExpr {}
+impl WhileExpr {
+    pub fn while_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![while]) }
+    pub fn condition(&self) -> Option<Condition> { support::child(&self.syntax) }
+}
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct RecordExpr {
+pub struct ContinueExpr {
     pub(crate) syntax: SyntaxNode,
 }
-impl RecordExpr {
-    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
-    pub fn record_expr_field_list(&self) -> Option<RecordExprFieldList> {
-        support::child(&self.syntax)
+impl ast::AttrsOwner for ContinueExpr {}
+impl ContinueExpr {
+    pub fn continue_token(&self) -> Option<SyntaxToken> {
+        support::token(&self.syntax, T![continue])
+    }
+    pub fn lifetime_token(&self) -> Option<SyntaxToken> {
+        support::token(&self.syntax, T![lifetime])
     }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct RefExpr {
+pub struct BreakExpr {
     pub(crate) syntax: SyntaxNode,
 }
-impl ast::AttrsOwner for RefExpr {}
-impl RefExpr {
-    pub fn amp_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![&]) }
-    pub fn raw_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![raw]) }
-    pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
-    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
+impl ast::AttrsOwner for BreakExpr {}
+impl BreakExpr {
+    pub fn break_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![break]) }
+    pub fn lifetime_token(&self) -> Option<SyntaxToken> {
+        support::token(&self.syntax, T![lifetime])
+    }
     pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -806,64 +794,34 @@ impl ReturnExpr {
     pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct TryExpr {
+pub struct CallExpr {
     pub(crate) syntax: SyntaxNode,
 }
-impl ast::AttrsOwner for TryExpr {}
-impl TryExpr {
+impl ast::AttrsOwner for CallExpr {}
+impl ast::ArgListOwner for CallExpr {}
+impl CallExpr {
     pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
-    pub fn question_mark_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![?]) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct TupleExpr {
+pub struct ArgList {
     pub(crate) syntax: SyntaxNode,
 }
-impl ast::AttrsOwner for TupleExpr {}
-impl TupleExpr {
+impl ArgList {
     pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
-    pub fn exprs(&self) -> AstChildren<Expr> { support::children(&self.syntax) }
+    pub fn args(&self) -> AstChildren<Expr> { support::children(&self.syntax) }
     pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct WhileExpr {
-    pub(crate) syntax: SyntaxNode,
-}
-impl ast::AttrsOwner for WhileExpr {}
-impl ast::LoopBodyOwner for WhileExpr {}
-impl WhileExpr {
-    pub fn while_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![while]) }
-    pub fn condition(&self) -> Option<Condition> { support::child(&self.syntax) }
-}
-#[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct RecordExprFieldList {
-    pub(crate) syntax: SyntaxNode,
-}
-impl ast::AttrsOwner for RecordExprFieldList {}
-impl RecordExprFieldList {
-    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
-    pub fn fields(&self) -> AstChildren<RecordExprField> { support::children(&self.syntax) }
-    pub fn dotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![..]) }
-    pub fn spread(&self) -> Option<Expr> { support::child(&self.syntax) }
-    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
-}
-#[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct RecordExprField {
+pub struct MethodCallExpr {
     pub(crate) syntax: SyntaxNode,
 }
-impl ast::AttrsOwner for RecordExprField {}
-impl RecordExprField {
-    pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
-    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
+impl ast::AttrsOwner for MethodCallExpr {}
+impl ast::ArgListOwner for MethodCallExpr {}
+impl MethodCallExpr {
     pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
-}
-#[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct ArgList {
-    pub(crate) syntax: SyntaxNode,
-}
-impl ArgList {
-    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
-    pub fn args(&self) -> AstChildren<Expr> { support::children(&self.syntax) }
-    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
+    pub fn dot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![.]) }
+    pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
+    pub fn type_arg_list(&self) -> Option<TypeArgList> { support::child(&self.syntax) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
 pub struct TypeArgList {
@@ -879,174 +837,162 @@ impl TypeArgList {
     pub fn r_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![>]) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct Condition {
+pub struct FieldExpr {
     pub(crate) syntax: SyntaxNode,
 }
-impl Condition {
-    pub fn let_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![let]) }
-    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
-    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
+impl ast::AttrsOwner for FieldExpr {}
+impl FieldExpr {
     pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
+    pub fn dot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![.]) }
+    pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct MatchArmList {
-    pub(crate) syntax: SyntaxNode,
-}
-impl ast::AttrsOwner for MatchArmList {}
-impl MatchArmList {
-    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
-    pub fn arms(&self) -> AstChildren<MatchArm> { support::children(&self.syntax) }
-    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
-}
-#[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct MatchArm {
+pub struct IndexExpr {
     pub(crate) syntax: SyntaxNode,
 }
-impl ast::AttrsOwner for MatchArm {}
-impl MatchArm {
-    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
-    pub fn guard(&self) -> Option<MatchGuard> { support::child(&self.syntax) }
-    pub fn fat_arrow_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=>]) }
-    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
-    pub fn comma_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![,]) }
+impl ast::AttrsOwner for IndexExpr {}
+impl IndexExpr {
+    pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
+    pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct MatchGuard {
+pub struct AwaitExpr {
     pub(crate) syntax: SyntaxNode,
 }
-impl MatchGuard {
-    pub fn if_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![if]) }
+impl ast::AttrsOwner for AwaitExpr {}
+impl AwaitExpr {
     pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
+    pub fn dot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![.]) }
+    pub fn await_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![await]) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct ArrayType {
+pub struct TryExpr {
     pub(crate) syntax: SyntaxNode,
 }
-impl ArrayType {
-    pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
-    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
-    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
+impl ast::AttrsOwner for TryExpr {}
+impl TryExpr {
     pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
-    pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
+    pub fn question_mark_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![?]) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct DynTraitType {
+pub struct CastExpr {
     pub(crate) syntax: SyntaxNode,
 }
-impl DynTraitType {
-    pub fn dyn_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![dyn]) }
-    pub fn type_bound_list(&self) -> Option<TypeBoundList> { support::child(&self.syntax) }
+impl ast::AttrsOwner for CastExpr {}
+impl CastExpr {
+    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
+    pub fn as_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![as]) }
+    pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct FnPointerType {
+pub struct RefExpr {
     pub(crate) syntax: SyntaxNode,
 }
-impl FnPointerType {
+impl ast::AttrsOwner for RefExpr {}
+impl RefExpr {
+    pub fn amp_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![&]) }
+    pub fn raw_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![raw]) }
+    pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
     pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
-    pub fn async_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![async]) }
-    pub fn unsafe_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![unsafe]) }
-    pub fn abi(&self) -> Option<Abi> { support::child(&self.syntax) }
-    pub fn fn_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![fn]) }
-    pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) }
-    pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) }
+    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct ForType {
+pub struct PrefixExpr {
     pub(crate) syntax: SyntaxNode,
 }
-impl ForType {
-    pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) }
-    pub fn generic_param_list(&self) -> Option<GenericParamList> { support::child(&self.syntax) }
-    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
+impl ast::AttrsOwner for PrefixExpr {}
+impl PrefixExpr {
+    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct ImplTraitType {
+pub struct BoxExpr {
     pub(crate) syntax: SyntaxNode,
 }
-impl ImplTraitType {
-    pub fn impl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![impl]) }
-    pub fn type_bound_list(&self) -> Option<TypeBoundList> { support::child(&self.syntax) }
+impl ast::AttrsOwner for BoxExpr {}
+impl BoxExpr {
+    pub fn box_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![box]) }
+    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct InferType {
+pub struct RangeExpr {
     pub(crate) syntax: SyntaxNode,
 }
-impl InferType {
-    pub fn underscore_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![_]) }
-}
+impl ast::AttrsOwner for RangeExpr {}
+impl RangeExpr {}
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct NeverType {
+pub struct BinExpr {
     pub(crate) syntax: SyntaxNode,
 }
-impl NeverType {
-    pub fn excl_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![!]) }
-}
+impl ast::AttrsOwner for BinExpr {}
+impl BinExpr {}
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct ParenType {
+pub struct MatchExpr {
     pub(crate) syntax: SyntaxNode,
 }
-impl ParenType {
-    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
-    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
-    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
+impl ast::AttrsOwner for MatchExpr {}
+impl MatchExpr {
+    pub fn match_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![match]) }
+    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
+    pub fn match_arm_list(&self) -> Option<MatchArmList> { support::child(&self.syntax) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct PathType {
+pub struct MatchArmList {
     pub(crate) syntax: SyntaxNode,
 }
-impl PathType {
-    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
+impl MatchArmList {
+    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
+    pub fn arms(&self) -> AstChildren<MatchArm> { support::children(&self.syntax) }
+    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct PointerType {
+pub struct MatchArm {
     pub(crate) syntax: SyntaxNode,
 }
-impl PointerType {
-    pub fn star_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![*]) }
-    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
-    pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
-    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
+impl ast::AttrsOwner for MatchArm {}
+impl MatchArm {
+    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
+    pub fn guard(&self) -> Option<MatchGuard> { support::child(&self.syntax) }
+    pub fn fat_arrow_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=>]) }
+    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct ReferenceType {
+pub struct MatchGuard {
     pub(crate) syntax: SyntaxNode,
 }
-impl ReferenceType {
-    pub fn amp_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![&]) }
-    pub fn lifetime_token(&self) -> Option<SyntaxToken> {
-        support::token(&self.syntax, T![lifetime])
-    }
-    pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
-    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
+impl MatchGuard {
+    pub fn if_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![if]) }
+    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct SliceType {
+pub struct RecordExpr {
     pub(crate) syntax: SyntaxNode,
 }
-impl SliceType {
-    pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
-    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
-    pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
+impl RecordExpr {
+    pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
+    pub fn record_expr_field_list(&self) -> Option<RecordExprFieldList> {
+        support::child(&self.syntax)
+    }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct TupleType {
+pub struct RecordExprFieldList {
     pub(crate) syntax: SyntaxNode,
 }
-impl TupleType {
-    pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
-    pub fn fields(&self) -> AstChildren<Type> { support::children(&self.syntax) }
-    pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
+impl RecordExprFieldList {
+    pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
+    pub fn fields(&self) -> AstChildren<RecordExprField> { support::children(&self.syntax) }
+    pub fn dotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![..]) }
+    pub fn spread(&self) -> Option<Expr> { support::child(&self.syntax) }
+    pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct TypeBound {
+pub struct RecordExprField {
     pub(crate) syntax: SyntaxNode,
 }
-impl TypeBound {
-    pub fn lifetime_token(&self) -> Option<SyntaxToken> {
-        support::token(&self.syntax, T![lifetime])
-    }
-    pub fn question_mark_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![?]) }
-    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
+impl ast::AttrsOwner for RecordExprField {}
+impl RecordExprField {
+    pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
+    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
+    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
 pub struct OrPat {
@@ -1220,6 +1166,53 @@ impl MacroStmts {
     pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
+pub struct TypeBound {
+    pub(crate) syntax: SyntaxNode,
+}
+impl TypeBound {
+    pub fn lifetime_token(&self) -> Option<SyntaxToken> {
+        support::token(&self.syntax, T![lifetime])
+    }
+    pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
+    pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
+}
+#[derive(Debug, Clone, PartialEq, Eq, Hash)]
+pub struct WherePred {
+    pub(crate) syntax: SyntaxNode,
+}
+impl ast::TypeBoundsOwner for WherePred {}
+impl WherePred {
+    pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) }
+    pub fn generic_param_list(&self) -> Option<GenericParamList> { support::child(&self.syntax) }
+    pub fn lifetime_token(&self) -> Option<SyntaxToken> {
+        support::token(&self.syntax, T![lifetime])
+    }
+    pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
+}
+#[derive(Debug, Clone, PartialEq, Eq, Hash)]
+pub struct ExprStmt {
+    pub(crate) syntax: SyntaxNode,
+}
+impl ast::AttrsOwner for ExprStmt {}
+impl ExprStmt {
+    pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
+    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
+}
+#[derive(Debug, Clone, PartialEq, Eq, Hash)]
+pub struct LetStmt {
+    pub(crate) syntax: SyntaxNode,
+}
+impl ast::AttrsOwner for LetStmt {}
+impl LetStmt {
+    pub fn let_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![let]) }
+    pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
+    pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
+    pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) }
+    pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
+    pub fn initializer(&self) -> Option<Expr> { support::child(&self.syntax) }
+    pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
+}
+#[derive(Debug, Clone, PartialEq, Eq, Hash)]
 pub struct PathSegment {
     pub(crate) syntax: SyntaxNode,
 }
@@ -1241,7 +1234,7 @@ pub struct TypeArg {
     pub(crate) syntax: SyntaxNode,
 }
 impl TypeArg {
-    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
+    pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
 pub struct LifetimeArg {
@@ -1260,7 +1253,7 @@ impl ast::TypeBoundsOwner for AssocTypeArg {}
 impl AssocTypeArg {
     pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
     pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
-    pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
+    pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
 pub struct ConstArg {
@@ -1289,20 +1282,20 @@ pub enum Item {
 }
 impl ast::AttrsOwner for Item {}
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub enum Type {
-    ArrayType(ArrayType),
-    DynTraitType(DynTraitType),
-    FnPointerType(FnPointerType),
-    ForType(ForType),
-    ImplTraitType(ImplTraitType),
-    InferType(InferType),
-    NeverType(NeverType),
+pub enum TypeRef {
     ParenType(ParenType),
+    TupleType(TupleType),
+    NeverType(NeverType),
     PathType(PathType),
     PointerType(PointerType),
-    ReferenceType(ReferenceType),
+    ArrayType(ArrayType),
     SliceType(SliceType),
-    TupleType(TupleType),
+    ReferenceType(ReferenceType),
+    PlaceholderType(PlaceholderType),
+    FnPointerType(FnPointerType),
+    ForType(ForType),
+    ImplTraitType(ImplTraitType),
+    DynTraitType(DynTraitType),
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
 pub enum Pat {
@@ -1329,54 +1322,44 @@ pub enum FieldList {
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
 pub enum Expr {
+    TupleExpr(TupleExpr),
     ArrayExpr(ArrayExpr),
-    AwaitExpr(AwaitExpr),
-    BinExpr(BinExpr),
-    BlockExpr(BlockExpr),
-    BoxExpr(BoxExpr),
-    BreakExpr(BreakExpr),
-    CallExpr(CallExpr),
-    CastExpr(CastExpr),
-    ContinueExpr(ContinueExpr),
-    EffectExpr(EffectExpr),
-    FieldExpr(FieldExpr),
-    ForExpr(ForExpr),
+    ParenExpr(ParenExpr),
+    PathExpr(PathExpr),
+    LambdaExpr(LambdaExpr),
     IfExpr(IfExpr),
-    IndexExpr(IndexExpr),
-    Label(Label),
-    ClosureExpr(ClosureExpr),
-    Literal(Literal),
     LoopExpr(LoopExpr),
-    MacroCall(MacroCall),
+    ForExpr(ForExpr),
+    WhileExpr(WhileExpr),
+    ContinueExpr(ContinueExpr),
+    BreakExpr(BreakExpr),
+    Label(Label),
+    BlockExpr(BlockExpr),
+    ReturnExpr(ReturnExpr),
     MatchExpr(MatchExpr),
-    MethodCallExpr(MethodCallExpr),
-    ParenExpr(ParenExpr),
-    PathExpr(PathExpr),
-    PrefixExpr(PrefixExpr),
-    RangeExpr(RangeExpr),
     RecordExpr(RecordExpr),
-    RefExpr(RefExpr),
-    ReturnExpr(ReturnExpr),
-    TryExpr(TryExpr),
-    TupleExpr(TupleExpr),
-    WhileExpr(WhileExpr),
-}
-#[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub enum AdtDef {
-    Enum(Enum),
-    Struct(Struct),
-    Union(Union),
+    CallExpr(CallExpr),
+    IndexExpr(IndexExpr),
+    MethodCallExpr(MethodCallExpr),
+    FieldExpr(FieldExpr),
+    AwaitExpr(AwaitExpr),
+    TryExpr(TryExpr),
+    EffectExpr(EffectExpr),
+    CastExpr(CastExpr),
+    RefExpr(RefExpr),
+    PrefixExpr(PrefixExpr),
+    RangeExpr(RangeExpr),
+    BinExpr(BinExpr),
+    Literal(Literal),
+    MacroCall(MacroCall),
+    BoxExpr(BoxExpr),
 }
-impl ast::AttrsOwner for AdtDef {}
-impl ast::GenericParamsOwner for AdtDef {}
-impl ast::NameOwner for AdtDef {}
-impl ast::VisibilityOwner for AdtDef {}
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
 pub enum AssocItem {
-    Const(Const),
     Fn(Fn),
-    MacroCall(MacroCall),
     TypeAlias(TypeAlias),
+    Const(Const),
+    MacroCall(MacroCall),
 }
 impl ast::AttrsOwner for AssocItem {}
 impl ast::NameOwner for AssocItem {}
@@ -1390,17 +1373,27 @@ impl ast::AttrsOwner for ExternItem {}
 impl ast::NameOwner for ExternItem {}
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
 pub enum GenericParam {
-    ConstParam(ConstParam),
     LifetimeParam(LifetimeParam),
     TypeParam(TypeParam),
+    ConstParam(ConstParam),
 }
 impl ast::AttrsOwner for GenericParam {}
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
 pub enum Stmt {
-    ExprStmt(ExprStmt),
-    Item(Item),
     LetStmt(LetStmt),
+    ExprStmt(ExprStmt),
+}
+impl ast::AttrsOwner for Stmt {}
+#[derive(Debug, Clone, PartialEq, Eq, Hash)]
+pub enum AdtDef {
+    Struct(Struct),
+    Enum(Enum),
+    Union(Union),
 }
+impl ast::AttrsOwner for AdtDef {}
+impl ast::GenericParamsOwner for AdtDef {}
+impl ast::NameOwner for AdtDef {}
+impl ast::VisibilityOwner for AdtDef {}
 impl AstNode for SourceFile {
     fn can_cast(kind: SyntaxKind) -> bool { kind == SOURCE_FILE }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
@@ -1852,17 +1845,6 @@ impl AstNode for ExternItemList {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for ConstParam {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == CONST_PARAM }
-    fn cast(syntax: SyntaxNode) -> Option<Self> {
-        if Self::can_cast(syntax.kind()) {
-            Some(Self { syntax })
-        } else {
-            None
-        }
-    }
-    fn syntax(&self) -> &SyntaxNode { &self.syntax }
-}
 impl AstNode for LifetimeParam {
     fn can_cast(kind: SyntaxKind) -> bool { kind == LIFETIME_PARAM }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
@@ -1885,8 +1867,8 @@ impl AstNode for TypeParam {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for WherePred {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == WHERE_PRED }
+impl AstNode for ConstParam {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == CONST_PARAM }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -1918,41 +1900,8 @@ impl AstNode for TokenTree {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for ExprStmt {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == EXPR_STMT }
-    fn cast(syntax: SyntaxNode) -> Option<Self> {
-        if Self::can_cast(syntax.kind()) {
-            Some(Self { syntax })
-        } else {
-            None
-        }
-    }
-    fn syntax(&self) -> &SyntaxNode { &self.syntax }
-}
-impl AstNode for LetStmt {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == LET_STMT }
-    fn cast(syntax: SyntaxNode) -> Option<Self> {
-        if Self::can_cast(syntax.kind()) {
-            Some(Self { syntax })
-        } else {
-            None
-        }
-    }
-    fn syntax(&self) -> &SyntaxNode { &self.syntax }
-}
-impl AstNode for ArrayExpr {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == ARRAY_EXPR }
-    fn cast(syntax: SyntaxNode) -> Option<Self> {
-        if Self::can_cast(syntax.kind()) {
-            Some(Self { syntax })
-        } else {
-            None
-        }
-    }
-    fn syntax(&self) -> &SyntaxNode { &self.syntax }
-}
-impl AstNode for AwaitExpr {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == AWAIT_EXPR }
+impl AstNode for ParenType {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == PAREN_TYPE }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -1962,8 +1911,8 @@ impl AstNode for AwaitExpr {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for BinExpr {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == BIN_EXPR }
+impl AstNode for TupleType {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_TYPE }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -1973,8 +1922,8 @@ impl AstNode for BinExpr {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for BoxExpr {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == BOX_EXPR }
+impl AstNode for NeverType {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == NEVER_TYPE }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -1984,8 +1933,8 @@ impl AstNode for BoxExpr {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for BreakExpr {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == BREAK_EXPR }
+impl AstNode for PathType {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == PATH_TYPE }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -1995,8 +1944,8 @@ impl AstNode for BreakExpr {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for CallExpr {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == CALL_EXPR }
+impl AstNode for PointerType {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == POINTER_TYPE }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2006,8 +1955,8 @@ impl AstNode for CallExpr {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for CastExpr {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == CAST_EXPR }
+impl AstNode for ArrayType {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == ARRAY_TYPE }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2017,8 +1966,8 @@ impl AstNode for CastExpr {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for ContinueExpr {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == CONTINUE_EXPR }
+impl AstNode for SliceType {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == SLICE_TYPE }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2028,8 +1977,8 @@ impl AstNode for ContinueExpr {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for EffectExpr {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == EFFECT_EXPR }
+impl AstNode for ReferenceType {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == REFERENCE_TYPE }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2039,8 +1988,8 @@ impl AstNode for EffectExpr {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for FieldExpr {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == FIELD_EXPR }
+impl AstNode for PlaceholderType {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == PLACEHOLDER_TYPE }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2050,8 +1999,8 @@ impl AstNode for FieldExpr {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for ForExpr {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == FOR_EXPR }
+impl AstNode for FnPointerType {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == FN_POINTER_TYPE }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2061,8 +2010,8 @@ impl AstNode for ForExpr {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for IfExpr {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == IF_EXPR }
+impl AstNode for ForType {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == FOR_TYPE }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2072,8 +2021,8 @@ impl AstNode for IfExpr {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for IndexExpr {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == INDEX_EXPR }
+impl AstNode for ImplTraitType {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == IMPL_TRAIT_TYPE }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2083,8 +2032,8 @@ impl AstNode for IndexExpr {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for Label {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == LABEL }
+impl AstNode for DynTraitType {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == DYN_TRAIT_TYPE }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2094,8 +2043,8 @@ impl AstNode for Label {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for ClosureExpr {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == CLOSURE_EXPR }
+impl AstNode for TupleExpr {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_EXPR }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2105,8 +2054,8 @@ impl AstNode for ClosureExpr {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for LoopExpr {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == LOOP_EXPR }
+impl AstNode for ArrayExpr {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == ARRAY_EXPR }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2116,8 +2065,8 @@ impl AstNode for LoopExpr {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for MatchExpr {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == MATCH_EXPR }
+impl AstNode for ParenExpr {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == PAREN_EXPR }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2127,8 +2076,8 @@ impl AstNode for MatchExpr {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for MethodCallExpr {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == METHOD_CALL_EXPR }
+impl AstNode for PathExpr {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == PATH_EXPR }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2138,8 +2087,8 @@ impl AstNode for MethodCallExpr {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for ParenExpr {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == PAREN_EXPR }
+impl AstNode for LambdaExpr {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == LAMBDA_EXPR }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2149,8 +2098,8 @@ impl AstNode for ParenExpr {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for PathExpr {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == PATH_EXPR }
+impl AstNode for IfExpr {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == IF_EXPR }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2160,8 +2109,8 @@ impl AstNode for PathExpr {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for PrefixExpr {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == PREFIX_EXPR }
+impl AstNode for Condition {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == CONDITION }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2171,8 +2120,8 @@ impl AstNode for PrefixExpr {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for RangeExpr {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == RANGE_EXPR }
+impl AstNode for EffectExpr {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == EFFECT_EXPR }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2182,8 +2131,8 @@ impl AstNode for RangeExpr {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for RecordExpr {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_EXPR }
+impl AstNode for Label {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == LABEL }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2193,8 +2142,8 @@ impl AstNode for RecordExpr {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for RefExpr {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == REF_EXPR }
+impl AstNode for LoopExpr {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == LOOP_EXPR }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2204,8 +2153,8 @@ impl AstNode for RefExpr {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for ReturnExpr {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == RETURN_EXPR }
+impl AstNode for ForExpr {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == FOR_EXPR }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2215,8 +2164,8 @@ impl AstNode for ReturnExpr {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for TryExpr {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == TRY_EXPR }
+impl AstNode for WhileExpr {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == WHILE_EXPR }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2226,8 +2175,8 @@ impl AstNode for TryExpr {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for TupleExpr {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_EXPR }
+impl AstNode for ContinueExpr {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == CONTINUE_EXPR }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2237,8 +2186,8 @@ impl AstNode for TupleExpr {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for WhileExpr {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == WHILE_EXPR }
+impl AstNode for BreakExpr {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == BREAK_EXPR }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2248,8 +2197,8 @@ impl AstNode for WhileExpr {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for RecordExprFieldList {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_EXPR_FIELD_LIST }
+impl AstNode for ReturnExpr {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == RETURN_EXPR }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2259,8 +2208,8 @@ impl AstNode for RecordExprFieldList {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for RecordExprField {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_EXPR_FIELD }
+impl AstNode for CallExpr {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == CALL_EXPR }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2281,8 +2230,8 @@ impl AstNode for ArgList {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for TypeArgList {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_ARG_LIST }
+impl AstNode for MethodCallExpr {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == METHOD_CALL_EXPR }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2292,8 +2241,8 @@ impl AstNode for TypeArgList {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for Condition {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == CONDITION }
+impl AstNode for TypeArgList {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_ARG_LIST }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2303,8 +2252,8 @@ impl AstNode for Condition {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for MatchArmList {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == MATCH_ARM_LIST }
+impl AstNode for FieldExpr {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == FIELD_EXPR }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2314,8 +2263,8 @@ impl AstNode for MatchArmList {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for MatchArm {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == MATCH_ARM }
+impl AstNode for IndexExpr {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == INDEX_EXPR }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2325,8 +2274,8 @@ impl AstNode for MatchArm {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for MatchGuard {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == MATCH_GUARD }
+impl AstNode for AwaitExpr {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == AWAIT_EXPR }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2336,8 +2285,8 @@ impl AstNode for MatchGuard {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for ArrayType {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == ARRAY_TYPE }
+impl AstNode for TryExpr {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == TRY_EXPR }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2347,8 +2296,8 @@ impl AstNode for ArrayType {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for DynTraitType {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == DYN_TRAIT_TYPE }
+impl AstNode for CastExpr {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == CAST_EXPR }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2358,8 +2307,8 @@ impl AstNode for DynTraitType {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for FnPointerType {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == FN_POINTER_TYPE }
+impl AstNode for RefExpr {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == REF_EXPR }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2369,8 +2318,8 @@ impl AstNode for FnPointerType {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for ForType {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == FOR_TYPE }
+impl AstNode for PrefixExpr {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == PREFIX_EXPR }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2380,8 +2329,8 @@ impl AstNode for ForType {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for ImplTraitType {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == IMPL_TRAIT_TYPE }
+impl AstNode for BoxExpr {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == BOX_EXPR }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2391,8 +2340,8 @@ impl AstNode for ImplTraitType {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for InferType {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == INFER_TYPE }
+impl AstNode for RangeExpr {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == RANGE_EXPR }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2402,8 +2351,8 @@ impl AstNode for InferType {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for NeverType {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == NEVER_TYPE }
+impl AstNode for BinExpr {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == BIN_EXPR }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2413,8 +2362,8 @@ impl AstNode for NeverType {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for ParenType {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == PAREN_TYPE }
+impl AstNode for MatchExpr {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == MATCH_EXPR }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2424,8 +2373,8 @@ impl AstNode for ParenType {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for PathType {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == PATH_TYPE }
+impl AstNode for MatchArmList {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == MATCH_ARM_LIST }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2435,8 +2384,8 @@ impl AstNode for PathType {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for PointerType {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == POINTER_TYPE }
+impl AstNode for MatchArm {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == MATCH_ARM }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2445,9 +2394,9 @@ impl AstNode for PointerType {
         }
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
-}
-impl AstNode for ReferenceType {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == REFERENCE_TYPE }
+}
+impl AstNode for MatchGuard {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == MATCH_GUARD }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2457,8 +2406,8 @@ impl AstNode for ReferenceType {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for SliceType {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == SLICE_TYPE }
+impl AstNode for RecordExpr {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_EXPR }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2468,8 +2417,8 @@ impl AstNode for SliceType {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for TupleType {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == TUPLE_TYPE }
+impl AstNode for RecordExprFieldList {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_EXPR_FIELD_LIST }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2479,8 +2428,8 @@ impl AstNode for TupleType {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for TypeBound {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_BOUND }
+impl AstNode for RecordExprField {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_EXPR_FIELD }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2710,6 +2659,50 @@ impl AstNode for MacroStmts {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
+impl AstNode for TypeBound {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_BOUND }
+    fn cast(syntax: SyntaxNode) -> Option<Self> {
+        if Self::can_cast(syntax.kind()) {
+            Some(Self { syntax })
+        } else {
+            None
+        }
+    }
+    fn syntax(&self) -> &SyntaxNode { &self.syntax }
+}
+impl AstNode for WherePred {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == WHERE_PRED }
+    fn cast(syntax: SyntaxNode) -> Option<Self> {
+        if Self::can_cast(syntax.kind()) {
+            Some(Self { syntax })
+        } else {
+            None
+        }
+    }
+    fn syntax(&self) -> &SyntaxNode { &self.syntax }
+}
+impl AstNode for ExprStmt {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == EXPR_STMT }
+    fn cast(syntax: SyntaxNode) -> Option<Self> {
+        if Self::can_cast(syntax.kind()) {
+            Some(Self { syntax })
+        } else {
+            None
+        }
+    }
+    fn syntax(&self) -> &SyntaxNode { &self.syntax }
+}
+impl AstNode for LetStmt {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == LET_STMT }
+    fn cast(syntax: SyntaxNode) -> Option<Self> {
+        if Self::can_cast(syntax.kind()) {
+            Some(Self { syntax })
+        } else {
+            None
+        }
+    }
+    fn syntax(&self) -> &SyntaxNode { &self.syntax }
+}
 impl AstNode for PathSegment {
     fn can_cast(kind: SyntaxKind) -> bool { kind == PATH_SEGMENT }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
@@ -2854,88 +2847,88 @@ impl AstNode for Item {
         }
     }
 }
-impl From<ArrayType> for Type {
-    fn from(node: ArrayType) -> Type { Type::ArrayType(node) }
+impl From<ParenType> for TypeRef {
+    fn from(node: ParenType) -> TypeRef { TypeRef::ParenType(node) }
 }
-impl From<DynTraitType> for Type {
-    fn from(node: DynTraitType) -> Type { Type::DynTraitType(node) }
+impl From<TupleType> for TypeRef {
+    fn from(node: TupleType) -> TypeRef { TypeRef::TupleType(node) }
 }
-impl From<FnPointerType> for Type {
-    fn from(node: FnPointerType) -> Type { Type::FnPointerType(node) }
+impl From<NeverType> for TypeRef {
+    fn from(node: NeverType) -> TypeRef { TypeRef::NeverType(node) }
 }
-impl From<ForType> for Type {
-    fn from(node: ForType) -> Type { Type::ForType(node) }
+impl From<PathType> for TypeRef {
+    fn from(node: PathType) -> TypeRef { TypeRef::PathType(node) }
 }
-impl From<ImplTraitType> for Type {
-    fn from(node: ImplTraitType) -> Type { Type::ImplTraitType(node) }
+impl From<PointerType> for TypeRef {
+    fn from(node: PointerType) -> TypeRef { TypeRef::PointerType(node) }
 }
-impl From<InferType> for Type {
-    fn from(node: InferType) -> Type { Type::InferType(node) }
+impl From<ArrayType> for TypeRef {
+    fn from(node: ArrayType) -> TypeRef { TypeRef::ArrayType(node) }
 }
-impl From<NeverType> for Type {
-    fn from(node: NeverType) -> Type { Type::NeverType(node) }
+impl From<SliceType> for TypeRef {
+    fn from(node: SliceType) -> TypeRef { TypeRef::SliceType(node) }
 }
-impl From<ParenType> for Type {
-    fn from(node: ParenType) -> Type { Type::ParenType(node) }
+impl From<ReferenceType> for TypeRef {
+    fn from(node: ReferenceType) -> TypeRef { TypeRef::ReferenceType(node) }
 }
-impl From<PathType> for Type {
-    fn from(node: PathType) -> Type { Type::PathType(node) }
+impl From<PlaceholderType> for TypeRef {
+    fn from(node: PlaceholderType) -> TypeRef { TypeRef::PlaceholderType(node) }
 }
-impl From<PointerType> for Type {
-    fn from(node: PointerType) -> Type { Type::PointerType(node) }
+impl From<FnPointerType> for TypeRef {
+    fn from(node: FnPointerType) -> TypeRef { TypeRef::FnPointerType(node) }
 }
-impl From<ReferenceType> for Type {
-    fn from(node: ReferenceType) -> Type { Type::ReferenceType(node) }
+impl From<ForType> for TypeRef {
+    fn from(node: ForType) -> TypeRef { TypeRef::ForType(node) }
 }
-impl From<SliceType> for Type {
-    fn from(node: SliceType) -> Type { Type::SliceType(node) }
+impl From<ImplTraitType> for TypeRef {
+    fn from(node: ImplTraitType) -> TypeRef { TypeRef::ImplTraitType(node) }
 }
-impl From<TupleType> for Type {
-    fn from(node: TupleType) -> Type { Type::TupleType(node) }
+impl From<DynTraitType> for TypeRef {
+    fn from(node: DynTraitType) -> TypeRef { TypeRef::DynTraitType(node) }
 }
-impl AstNode for Type {
+impl AstNode for TypeRef {
     fn can_cast(kind: SyntaxKind) -> bool {
         match kind {
-            ARRAY_TYPE | DYN_TRAIT_TYPE | FN_POINTER_TYPE | FOR_TYPE | IMPL_TRAIT_TYPE
-            | INFER_TYPE | NEVER_TYPE | PAREN_TYPE | PATH_TYPE | POINTER_TYPE | REFERENCE_TYPE
-            | SLICE_TYPE | TUPLE_TYPE => true,
+            PAREN_TYPE | TUPLE_TYPE | NEVER_TYPE | PATH_TYPE | POINTER_TYPE | ARRAY_TYPE
+            | SLICE_TYPE | REFERENCE_TYPE | PLACEHOLDER_TYPE | FN_POINTER_TYPE | FOR_TYPE
+            | IMPL_TRAIT_TYPE | DYN_TRAIT_TYPE => true,
             _ => false,
         }
     }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         let res = match syntax.kind() {
-            ARRAY_TYPE => Type::ArrayType(ArrayType { syntax }),
-            DYN_TRAIT_TYPE => Type::DynTraitType(DynTraitType { syntax }),
-            FN_POINTER_TYPE => Type::FnPointerType(FnPointerType { syntax }),
-            FOR_TYPE => Type::ForType(ForType { syntax }),
-            IMPL_TRAIT_TYPE => Type::ImplTraitType(ImplTraitType { syntax }),
-            INFER_TYPE => Type::InferType(InferType { syntax }),
-            NEVER_TYPE => Type::NeverType(NeverType { syntax }),
-            PAREN_TYPE => Type::ParenType(ParenType { syntax }),
-            PATH_TYPE => Type::PathType(PathType { syntax }),
-            POINTER_TYPE => Type::PointerType(PointerType { syntax }),
-            REFERENCE_TYPE => Type::ReferenceType(ReferenceType { syntax }),
-            SLICE_TYPE => Type::SliceType(SliceType { syntax }),
-            TUPLE_TYPE => Type::TupleType(TupleType { syntax }),
+            PAREN_TYPE => TypeRef::ParenType(ParenType { syntax }),
+            TUPLE_TYPE => TypeRef::TupleType(TupleType { syntax }),
+            NEVER_TYPE => TypeRef::NeverType(NeverType { syntax }),
+            PATH_TYPE => TypeRef::PathType(PathType { syntax }),
+            POINTER_TYPE => TypeRef::PointerType(PointerType { syntax }),
+            ARRAY_TYPE => TypeRef::ArrayType(ArrayType { syntax }),
+            SLICE_TYPE => TypeRef::SliceType(SliceType { syntax }),
+            REFERENCE_TYPE => TypeRef::ReferenceType(ReferenceType { syntax }),
+            PLACEHOLDER_TYPE => TypeRef::PlaceholderType(PlaceholderType { syntax }),
+            FN_POINTER_TYPE => TypeRef::FnPointerType(FnPointerType { syntax }),
+            FOR_TYPE => TypeRef::ForType(ForType { syntax }),
+            IMPL_TRAIT_TYPE => TypeRef::ImplTraitType(ImplTraitType { syntax }),
+            DYN_TRAIT_TYPE => TypeRef::DynTraitType(DynTraitType { syntax }),
             _ => return None,
         };
         Some(res)
     }
     fn syntax(&self) -> &SyntaxNode {
         match self {
-            Type::ArrayType(it) => &it.syntax,
-            Type::DynTraitType(it) => &it.syntax,
-            Type::FnPointerType(it) => &it.syntax,
-            Type::ForType(it) => &it.syntax,
-            Type::ImplTraitType(it) => &it.syntax,
-            Type::InferType(it) => &it.syntax,
-            Type::NeverType(it) => &it.syntax,
-            Type::ParenType(it) => &it.syntax,
-            Type::PathType(it) => &it.syntax,
-            Type::PointerType(it) => &it.syntax,
-            Type::ReferenceType(it) => &it.syntax,
-            Type::SliceType(it) => &it.syntax,
-            Type::TupleType(it) => &it.syntax,
+            TypeRef::ParenType(it) => &it.syntax,
+            TypeRef::TupleType(it) => &it.syntax,
+            TypeRef::NeverType(it) => &it.syntax,
+            TypeRef::PathType(it) => &it.syntax,
+            TypeRef::PointerType(it) => &it.syntax,
+            TypeRef::ArrayType(it) => &it.syntax,
+            TypeRef::SliceType(it) => &it.syntax,
+            TypeRef::ReferenceType(it) => &it.syntax,
+            TypeRef::PlaceholderType(it) => &it.syntax,
+            TypeRef::FnPointerType(it) => &it.syntax,
+            TypeRef::ForType(it) => &it.syntax,
+            TypeRef::ImplTraitType(it) => &it.syntax,
+            TypeRef::DynTraitType(it) => &it.syntax,
         }
     }
 }
@@ -3062,251 +3055,220 @@ impl AstNode for FieldList {
         }
     }
 }
+impl From<TupleExpr> for Expr {
+    fn from(node: TupleExpr) -> Expr { Expr::TupleExpr(node) }
+}
 impl From<ArrayExpr> for Expr {
     fn from(node: ArrayExpr) -> Expr { Expr::ArrayExpr(node) }
 }
-impl From<AwaitExpr> for Expr {
-    fn from(node: AwaitExpr) -> Expr { Expr::AwaitExpr(node) }
+impl From<ParenExpr> for Expr {
+    fn from(node: ParenExpr) -> Expr { Expr::ParenExpr(node) }
 }
-impl From<BinExpr> for Expr {
-    fn from(node: BinExpr) -> Expr { Expr::BinExpr(node) }
+impl From<PathExpr> for Expr {
+    fn from(node: PathExpr) -> Expr { Expr::PathExpr(node) }
 }
-impl From<BlockExpr> for Expr {
-    fn from(node: BlockExpr) -> Expr { Expr::BlockExpr(node) }
+impl From<LambdaExpr> for Expr {
+    fn from(node: LambdaExpr) -> Expr { Expr::LambdaExpr(node) }
 }
-impl From<BoxExpr> for Expr {
-    fn from(node: BoxExpr) -> Expr { Expr::BoxExpr(node) }
+impl From<IfExpr> for Expr {
+    fn from(node: IfExpr) -> Expr { Expr::IfExpr(node) }
 }
-impl From<BreakExpr> for Expr {
-    fn from(node: BreakExpr) -> Expr { Expr::BreakExpr(node) }
+impl From<LoopExpr> for Expr {
+    fn from(node: LoopExpr) -> Expr { Expr::LoopExpr(node) }
 }
-impl From<CallExpr> for Expr {
-    fn from(node: CallExpr) -> Expr { Expr::CallExpr(node) }
+impl From<ForExpr> for Expr {
+    fn from(node: ForExpr) -> Expr { Expr::ForExpr(node) }
 }
-impl From<CastExpr> for Expr {
-    fn from(node: CastExpr) -> Expr { Expr::CastExpr(node) }
+impl From<WhileExpr> for Expr {
+    fn from(node: WhileExpr) -> Expr { Expr::WhileExpr(node) }
 }
 impl From<ContinueExpr> for Expr {
     fn from(node: ContinueExpr) -> Expr { Expr::ContinueExpr(node) }
 }
-impl From<EffectExpr> for Expr {
-    fn from(node: EffectExpr) -> Expr { Expr::EffectExpr(node) }
-}
-impl From<FieldExpr> for Expr {
-    fn from(node: FieldExpr) -> Expr { Expr::FieldExpr(node) }
-}
-impl From<ForExpr> for Expr {
-    fn from(node: ForExpr) -> Expr { Expr::ForExpr(node) }
-}
-impl From<IfExpr> for Expr {
-    fn from(node: IfExpr) -> Expr { Expr::IfExpr(node) }
-}
-impl From<IndexExpr> for Expr {
-    fn from(node: IndexExpr) -> Expr { Expr::IndexExpr(node) }
+impl From<BreakExpr> for Expr {
+    fn from(node: BreakExpr) -> Expr { Expr::BreakExpr(node) }
 }
 impl From<Label> for Expr {
     fn from(node: Label) -> Expr { Expr::Label(node) }
 }
-impl From<ClosureExpr> for Expr {
-    fn from(node: ClosureExpr) -> Expr { Expr::ClosureExpr(node) }
-}
-impl From<Literal> for Expr {
-    fn from(node: Literal) -> Expr { Expr::Literal(node) }
-}
-impl From<LoopExpr> for Expr {
-    fn from(node: LoopExpr) -> Expr { Expr::LoopExpr(node) }
+impl From<BlockExpr> for Expr {
+    fn from(node: BlockExpr) -> Expr { Expr::BlockExpr(node) }
 }
-impl From<MacroCall> for Expr {
-    fn from(node: MacroCall) -> Expr { Expr::MacroCall(node) }
+impl From<ReturnExpr> for Expr {
+    fn from(node: ReturnExpr) -> Expr { Expr::ReturnExpr(node) }
 }
 impl From<MatchExpr> for Expr {
     fn from(node: MatchExpr) -> Expr { Expr::MatchExpr(node) }
 }
+impl From<RecordExpr> for Expr {
+    fn from(node: RecordExpr) -> Expr { Expr::RecordExpr(node) }
+}
+impl From<CallExpr> for Expr {
+    fn from(node: CallExpr) -> Expr { Expr::CallExpr(node) }
+}
+impl From<IndexExpr> for Expr {
+    fn from(node: IndexExpr) -> Expr { Expr::IndexExpr(node) }
+}
 impl From<MethodCallExpr> for Expr {
     fn from(node: MethodCallExpr) -> Expr { Expr::MethodCallExpr(node) }
 }
-impl From<ParenExpr> for Expr {
-    fn from(node: ParenExpr) -> Expr { Expr::ParenExpr(node) }
+impl From<FieldExpr> for Expr {
+    fn from(node: FieldExpr) -> Expr { Expr::FieldExpr(node) }
 }
-impl From<PathExpr> for Expr {
-    fn from(node: PathExpr) -> Expr { Expr::PathExpr(node) }
+impl From<AwaitExpr> for Expr {
+    fn from(node: AwaitExpr) -> Expr { Expr::AwaitExpr(node) }
 }
-impl From<PrefixExpr> for Expr {
-    fn from(node: PrefixExpr) -> Expr { Expr::PrefixExpr(node) }
+impl From<TryExpr> for Expr {
+    fn from(node: TryExpr) -> Expr { Expr::TryExpr(node) }
 }
-impl From<RangeExpr> for Expr {
-    fn from(node: RangeExpr) -> Expr { Expr::RangeExpr(node) }
+impl From<EffectExpr> for Expr {
+    fn from(node: EffectExpr) -> Expr { Expr::EffectExpr(node) }
 }
-impl From<RecordExpr> for Expr {
-    fn from(node: RecordExpr) -> Expr { Expr::RecordExpr(node) }
+impl From<CastExpr> for Expr {
+    fn from(node: CastExpr) -> Expr { Expr::CastExpr(node) }
 }
 impl From<RefExpr> for Expr {
     fn from(node: RefExpr) -> Expr { Expr::RefExpr(node) }
 }
-impl From<ReturnExpr> for Expr {
-    fn from(node: ReturnExpr) -> Expr { Expr::ReturnExpr(node) }
+impl From<PrefixExpr> for Expr {
+    fn from(node: PrefixExpr) -> Expr { Expr::PrefixExpr(node) }
 }
-impl From<TryExpr> for Expr {
-    fn from(node: TryExpr) -> Expr { Expr::TryExpr(node) }
+impl From<RangeExpr> for Expr {
+    fn from(node: RangeExpr) -> Expr { Expr::RangeExpr(node) }
 }
-impl From<TupleExpr> for Expr {
-    fn from(node: TupleExpr) -> Expr { Expr::TupleExpr(node) }
+impl From<BinExpr> for Expr {
+    fn from(node: BinExpr) -> Expr { Expr::BinExpr(node) }
 }
-impl From<WhileExpr> for Expr {
-    fn from(node: WhileExpr) -> Expr { Expr::WhileExpr(node) }
+impl From<Literal> for Expr {
+    fn from(node: Literal) -> Expr { Expr::Literal(node) }
+}
+impl From<MacroCall> for Expr {
+    fn from(node: MacroCall) -> Expr { Expr::MacroCall(node) }
+}
+impl From<BoxExpr> for Expr {
+    fn from(node: BoxExpr) -> Expr { Expr::BoxExpr(node) }
 }
 impl AstNode for Expr {
     fn can_cast(kind: SyntaxKind) -> bool {
         match kind {
-            ARRAY_EXPR | AWAIT_EXPR | BIN_EXPR | BLOCK_EXPR | BOX_EXPR | BREAK_EXPR | CALL_EXPR
-            | CAST_EXPR | CONTINUE_EXPR | EFFECT_EXPR | FIELD_EXPR | FOR_EXPR | IF_EXPR
-            | INDEX_EXPR | LABEL | CLOSURE_EXPR | LITERAL | LOOP_EXPR | MACRO_CALL | MATCH_EXPR
-            | METHOD_CALL_EXPR | PAREN_EXPR | PATH_EXPR | PREFIX_EXPR | RANGE_EXPR
-            | RECORD_EXPR | REF_EXPR | RETURN_EXPR | TRY_EXPR | TUPLE_EXPR | WHILE_EXPR => true,
+            TUPLE_EXPR | ARRAY_EXPR | PAREN_EXPR | PATH_EXPR | LAMBDA_EXPR | IF_EXPR
+            | LOOP_EXPR | FOR_EXPR | WHILE_EXPR | CONTINUE_EXPR | BREAK_EXPR | LABEL
+            | BLOCK_EXPR | RETURN_EXPR | MATCH_EXPR | RECORD_EXPR | CALL_EXPR | INDEX_EXPR
+            | METHOD_CALL_EXPR | FIELD_EXPR | AWAIT_EXPR | TRY_EXPR | EFFECT_EXPR | CAST_EXPR
+            | REF_EXPR | PREFIX_EXPR | RANGE_EXPR | BIN_EXPR | LITERAL | MACRO_CALL | BOX_EXPR => {
+                true
+            }
             _ => false,
         }
     }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         let res = match syntax.kind() {
+            TUPLE_EXPR => Expr::TupleExpr(TupleExpr { syntax }),
             ARRAY_EXPR => Expr::ArrayExpr(ArrayExpr { syntax }),
-            AWAIT_EXPR => Expr::AwaitExpr(AwaitExpr { syntax }),
-            BIN_EXPR => Expr::BinExpr(BinExpr { syntax }),
-            BLOCK_EXPR => Expr::BlockExpr(BlockExpr { syntax }),
-            BOX_EXPR => Expr::BoxExpr(BoxExpr { syntax }),
-            BREAK_EXPR => Expr::BreakExpr(BreakExpr { syntax }),
-            CALL_EXPR => Expr::CallExpr(CallExpr { syntax }),
-            CAST_EXPR => Expr::CastExpr(CastExpr { syntax }),
-            CONTINUE_EXPR => Expr::ContinueExpr(ContinueExpr { syntax }),
-            EFFECT_EXPR => Expr::EffectExpr(EffectExpr { syntax }),
-            FIELD_EXPR => Expr::FieldExpr(FieldExpr { syntax }),
-            FOR_EXPR => Expr::ForExpr(ForExpr { syntax }),
+            PAREN_EXPR => Expr::ParenExpr(ParenExpr { syntax }),
+            PATH_EXPR => Expr::PathExpr(PathExpr { syntax }),
+            LAMBDA_EXPR => Expr::LambdaExpr(LambdaExpr { syntax }),
             IF_EXPR => Expr::IfExpr(IfExpr { syntax }),
-            INDEX_EXPR => Expr::IndexExpr(IndexExpr { syntax }),
-            LABEL => Expr::Label(Label { syntax }),
-            CLOSURE_EXPR => Expr::ClosureExpr(ClosureExpr { syntax }),
-            LITERAL => Expr::Literal(Literal { syntax }),
             LOOP_EXPR => Expr::LoopExpr(LoopExpr { syntax }),
-            MACRO_CALL => Expr::MacroCall(MacroCall { syntax }),
+            FOR_EXPR => Expr::ForExpr(ForExpr { syntax }),
+            WHILE_EXPR => Expr::WhileExpr(WhileExpr { syntax }),
+            CONTINUE_EXPR => Expr::ContinueExpr(ContinueExpr { syntax }),
+            BREAK_EXPR => Expr::BreakExpr(BreakExpr { syntax }),
+            LABEL => Expr::Label(Label { syntax }),
+            BLOCK_EXPR => Expr::BlockExpr(BlockExpr { syntax }),
+            RETURN_EXPR => Expr::ReturnExpr(ReturnExpr { syntax }),
             MATCH_EXPR => Expr::MatchExpr(MatchExpr { syntax }),
+            RECORD_EXPR => Expr::RecordExpr(RecordExpr { syntax }),
+            CALL_EXPR => Expr::CallExpr(CallExpr { syntax }),
+            INDEX_EXPR => Expr::IndexExpr(IndexExpr { syntax }),
             METHOD_CALL_EXPR => Expr::MethodCallExpr(MethodCallExpr { syntax }),
-            PAREN_EXPR => Expr::ParenExpr(ParenExpr { syntax }),
-            PATH_EXPR => Expr::PathExpr(PathExpr { syntax }),
+            FIELD_EXPR => Expr::FieldExpr(FieldExpr { syntax }),
+            AWAIT_EXPR => Expr::AwaitExpr(AwaitExpr { syntax }),
+            TRY_EXPR => Expr::TryExpr(TryExpr { syntax }),
+            EFFECT_EXPR => Expr::EffectExpr(EffectExpr { syntax }),
+            CAST_EXPR => Expr::CastExpr(CastExpr { syntax }),
+            REF_EXPR => Expr::RefExpr(RefExpr { syntax }),
             PREFIX_EXPR => Expr::PrefixExpr(PrefixExpr { syntax }),
             RANGE_EXPR => Expr::RangeExpr(RangeExpr { syntax }),
-            RECORD_EXPR => Expr::RecordExpr(RecordExpr { syntax }),
-            REF_EXPR => Expr::RefExpr(RefExpr { syntax }),
-            RETURN_EXPR => Expr::ReturnExpr(ReturnExpr { syntax }),
-            TRY_EXPR => Expr::TryExpr(TryExpr { syntax }),
-            TUPLE_EXPR => Expr::TupleExpr(TupleExpr { syntax }),
-            WHILE_EXPR => Expr::WhileExpr(WhileExpr { syntax }),
+            BIN_EXPR => Expr::BinExpr(BinExpr { syntax }),
+            LITERAL => Expr::Literal(Literal { syntax }),
+            MACRO_CALL => Expr::MacroCall(MacroCall { syntax }),
+            BOX_EXPR => Expr::BoxExpr(BoxExpr { syntax }),
             _ => return None,
         };
         Some(res)
     }
     fn syntax(&self) -> &SyntaxNode {
         match self {
+            Expr::TupleExpr(it) => &it.syntax,
             Expr::ArrayExpr(it) => &it.syntax,
-            Expr::AwaitExpr(it) => &it.syntax,
-            Expr::BinExpr(it) => &it.syntax,
-            Expr::BlockExpr(it) => &it.syntax,
-            Expr::BoxExpr(it) => &it.syntax,
-            Expr::BreakExpr(it) => &it.syntax,
-            Expr::CallExpr(it) => &it.syntax,
-            Expr::CastExpr(it) => &it.syntax,
-            Expr::ContinueExpr(it) => &it.syntax,
-            Expr::EffectExpr(it) => &it.syntax,
-            Expr::FieldExpr(it) => &it.syntax,
-            Expr::ForExpr(it) => &it.syntax,
+            Expr::ParenExpr(it) => &it.syntax,
+            Expr::PathExpr(it) => &it.syntax,
+            Expr::LambdaExpr(it) => &it.syntax,
             Expr::IfExpr(it) => &it.syntax,
-            Expr::IndexExpr(it) => &it.syntax,
-            Expr::Label(it) => &it.syntax,
-            Expr::ClosureExpr(it) => &it.syntax,
-            Expr::Literal(it) => &it.syntax,
             Expr::LoopExpr(it) => &it.syntax,
-            Expr::MacroCall(it) => &it.syntax,
+            Expr::ForExpr(it) => &it.syntax,
+            Expr::WhileExpr(it) => &it.syntax,
+            Expr::ContinueExpr(it) => &it.syntax,
+            Expr::BreakExpr(it) => &it.syntax,
+            Expr::Label(it) => &it.syntax,
+            Expr::BlockExpr(it) => &it.syntax,
+            Expr::ReturnExpr(it) => &it.syntax,
             Expr::MatchExpr(it) => &it.syntax,
+            Expr::RecordExpr(it) => &it.syntax,
+            Expr::CallExpr(it) => &it.syntax,
+            Expr::IndexExpr(it) => &it.syntax,
             Expr::MethodCallExpr(it) => &it.syntax,
-            Expr::ParenExpr(it) => &it.syntax,
-            Expr::PathExpr(it) => &it.syntax,
+            Expr::FieldExpr(it) => &it.syntax,
+            Expr::AwaitExpr(it) => &it.syntax,
+            Expr::TryExpr(it) => &it.syntax,
+            Expr::EffectExpr(it) => &it.syntax,
+            Expr::CastExpr(it) => &it.syntax,
+            Expr::RefExpr(it) => &it.syntax,
             Expr::PrefixExpr(it) => &it.syntax,
             Expr::RangeExpr(it) => &it.syntax,
-            Expr::RecordExpr(it) => &it.syntax,
-            Expr::RefExpr(it) => &it.syntax,
-            Expr::ReturnExpr(it) => &it.syntax,
-            Expr::TryExpr(it) => &it.syntax,
-            Expr::TupleExpr(it) => &it.syntax,
-            Expr::WhileExpr(it) => &it.syntax,
+            Expr::BinExpr(it) => &it.syntax,
+            Expr::Literal(it) => &it.syntax,
+            Expr::MacroCall(it) => &it.syntax,
+            Expr::BoxExpr(it) => &it.syntax,
         }
     }
 }
-impl From<Enum> for AdtDef {
-    fn from(node: Enum) -> AdtDef { AdtDef::Enum(node) }
-}
-impl From<Struct> for AdtDef {
-    fn from(node: Struct) -> AdtDef { AdtDef::Struct(node) }
-}
-impl From<Union> for AdtDef {
-    fn from(node: Union) -> AdtDef { AdtDef::Union(node) }
+impl From<Fn> for AssocItem {
+    fn from(node: Fn) -> AssocItem { AssocItem::Fn(node) }
 }
-impl AstNode for AdtDef {
-    fn can_cast(kind: SyntaxKind) -> bool {
-        match kind {
-            ENUM | STRUCT | UNION => true,
-            _ => false,
-        }
-    }
-    fn cast(syntax: SyntaxNode) -> Option<Self> {
-        let res = match syntax.kind() {
-            ENUM => AdtDef::Enum(Enum { syntax }),
-            STRUCT => AdtDef::Struct(Struct { syntax }),
-            UNION => AdtDef::Union(Union { syntax }),
-            _ => return None,
-        };
-        Some(res)
-    }
-    fn syntax(&self) -> &SyntaxNode {
-        match self {
-            AdtDef::Enum(it) => &it.syntax,
-            AdtDef::Struct(it) => &it.syntax,
-            AdtDef::Union(it) => &it.syntax,
-        }
-    }
+impl From<TypeAlias> for AssocItem {
+    fn from(node: TypeAlias) -> AssocItem { AssocItem::TypeAlias(node) }
 }
 impl From<Const> for AssocItem {
     fn from(node: Const) -> AssocItem { AssocItem::Const(node) }
 }
-impl From<Fn> for AssocItem {
-    fn from(node: Fn) -> AssocItem { AssocItem::Fn(node) }
-}
 impl From<MacroCall> for AssocItem {
     fn from(node: MacroCall) -> AssocItem { AssocItem::MacroCall(node) }
 }
-impl From<TypeAlias> for AssocItem {
-    fn from(node: TypeAlias) -> AssocItem { AssocItem::TypeAlias(node) }
-}
 impl AstNode for AssocItem {
     fn can_cast(kind: SyntaxKind) -> bool {
         match kind {
-            CONST | FN | MACRO_CALL | TYPE_ALIAS => true,
+            FN | TYPE_ALIAS | CONST | MACRO_CALL => true,
             _ => false,
         }
     }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         let res = match syntax.kind() {
-            CONST => AssocItem::Const(Const { syntax }),
             FN => AssocItem::Fn(Fn { syntax }),
-            MACRO_CALL => AssocItem::MacroCall(MacroCall { syntax }),
             TYPE_ALIAS => AssocItem::TypeAlias(TypeAlias { syntax }),
+            CONST => AssocItem::Const(Const { syntax }),
+            MACRO_CALL => AssocItem::MacroCall(MacroCall { syntax }),
             _ => return None,
         };
         Some(res)
     }
     fn syntax(&self) -> &SyntaxNode {
         match self {
-            AssocItem::Const(it) => &it.syntax,
             AssocItem::Fn(it) => &it.syntax,
-            AssocItem::MacroCall(it) => &it.syntax,
             AssocItem::TypeAlias(it) => &it.syntax,
+            AssocItem::Const(it) => &it.syntax,
+            AssocItem::MacroCall(it) => &it.syntax,
         }
     }
 }
@@ -3343,54 +3305,106 @@ impl AstNode for ExternItem {
         }
     }
 }
-impl From<ConstParam> for GenericParam {
-    fn from(node: ConstParam) -> GenericParam { GenericParam::ConstParam(node) }
-}
 impl From<LifetimeParam> for GenericParam {
     fn from(node: LifetimeParam) -> GenericParam { GenericParam::LifetimeParam(node) }
 }
 impl From<TypeParam> for GenericParam {
     fn from(node: TypeParam) -> GenericParam { GenericParam::TypeParam(node) }
 }
+impl From<ConstParam> for GenericParam {
+    fn from(node: ConstParam) -> GenericParam { GenericParam::ConstParam(node) }
+}
 impl AstNode for GenericParam {
     fn can_cast(kind: SyntaxKind) -> bool {
         match kind {
-            CONST_PARAM | LIFETIME_PARAM | TYPE_PARAM => true,
+            LIFETIME_PARAM | TYPE_PARAM | CONST_PARAM => true,
             _ => false,
         }
     }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         let res = match syntax.kind() {
-            CONST_PARAM => GenericParam::ConstParam(ConstParam { syntax }),
             LIFETIME_PARAM => GenericParam::LifetimeParam(LifetimeParam { syntax }),
             TYPE_PARAM => GenericParam::TypeParam(TypeParam { syntax }),
+            CONST_PARAM => GenericParam::ConstParam(ConstParam { syntax }),
             _ => return None,
         };
         Some(res)
     }
     fn syntax(&self) -> &SyntaxNode {
         match self {
-            GenericParam::ConstParam(it) => &it.syntax,
             GenericParam::LifetimeParam(it) => &it.syntax,
             GenericParam::TypeParam(it) => &it.syntax,
+            GenericParam::ConstParam(it) => &it.syntax,
         }
     }
 }
+impl From<LetStmt> for Stmt {
+    fn from(node: LetStmt) -> Stmt { Stmt::LetStmt(node) }
+}
 impl From<ExprStmt> for Stmt {
     fn from(node: ExprStmt) -> Stmt { Stmt::ExprStmt(node) }
 }
-impl From<Item> for Stmt {
-    fn from(node: Item) -> Stmt { Stmt::Item(node) }
+impl AstNode for Stmt {
+    fn can_cast(kind: SyntaxKind) -> bool {
+        match kind {
+            LET_STMT | EXPR_STMT => true,
+            _ => false,
+        }
+    }
+    fn cast(syntax: SyntaxNode) -> Option<Self> {
+        let res = match syntax.kind() {
+            LET_STMT => Stmt::LetStmt(LetStmt { syntax }),
+            EXPR_STMT => Stmt::ExprStmt(ExprStmt { syntax }),
+            _ => return None,
+        };
+        Some(res)
+    }
+    fn syntax(&self) -> &SyntaxNode {
+        match self {
+            Stmt::LetStmt(it) => &it.syntax,
+            Stmt::ExprStmt(it) => &it.syntax,
+        }
+    }
 }
-impl From<LetStmt> for Stmt {
-    fn from(node: LetStmt) -> Stmt { Stmt::LetStmt(node) }
+impl From<Struct> for AdtDef {
+    fn from(node: Struct) -> AdtDef { AdtDef::Struct(node) }
+}
+impl From<Enum> for AdtDef {
+    fn from(node: Enum) -> AdtDef { AdtDef::Enum(node) }
+}
+impl From<Union> for AdtDef {
+    fn from(node: Union) -> AdtDef { AdtDef::Union(node) }
+}
+impl AstNode for AdtDef {
+    fn can_cast(kind: SyntaxKind) -> bool {
+        match kind {
+            STRUCT | ENUM | UNION => true,
+            _ => false,
+        }
+    }
+    fn cast(syntax: SyntaxNode) -> Option<Self> {
+        let res = match syntax.kind() {
+            STRUCT => AdtDef::Struct(Struct { syntax }),
+            ENUM => AdtDef::Enum(Enum { syntax }),
+            UNION => AdtDef::Union(Union { syntax }),
+            _ => return None,
+        };
+        Some(res)
+    }
+    fn syntax(&self) -> &SyntaxNode {
+        match self {
+            AdtDef::Struct(it) => &it.syntax,
+            AdtDef::Enum(it) => &it.syntax,
+            AdtDef::Union(it) => &it.syntax,
+        }
+    }
 }
 impl std::fmt::Display for Item {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for Type {
+impl std::fmt::Display for TypeRef {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
@@ -3410,11 +3424,6 @@ impl std::fmt::Display for Expr {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for AdtDef {
-    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-        std::fmt::Display::fmt(self.syntax(), f)
-    }
-}
 impl std::fmt::Display for AssocItem {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
@@ -3435,6 +3444,11 @@ impl std::fmt::Display for Stmt {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
+impl std::fmt::Display for AdtDef {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        std::fmt::Display::fmt(self.syntax(), f)
+    }
+}
 impl std::fmt::Display for SourceFile {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
@@ -3640,11 +3654,6 @@ impl std::fmt::Display for ExternItemList {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for ConstParam {
-    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-        std::fmt::Display::fmt(self.syntax(), f)
-    }
-}
 impl std::fmt::Display for LifetimeParam {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
@@ -3655,7 +3664,7 @@ impl std::fmt::Display for TypeParam {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for WherePred {
+impl std::fmt::Display for ConstParam {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
@@ -3670,162 +3679,147 @@ impl std::fmt::Display for TokenTree {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for ExprStmt {
-    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-        std::fmt::Display::fmt(self.syntax(), f)
-    }
-}
-impl std::fmt::Display for LetStmt {
-    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-        std::fmt::Display::fmt(self.syntax(), f)
-    }
-}
-impl std::fmt::Display for ArrayExpr {
-    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-        std::fmt::Display::fmt(self.syntax(), f)
-    }
-}
-impl std::fmt::Display for AwaitExpr {
+impl std::fmt::Display for ParenType {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for BinExpr {
+impl std::fmt::Display for TupleType {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for BoxExpr {
+impl std::fmt::Display for NeverType {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for BreakExpr {
+impl std::fmt::Display for PathType {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for CallExpr {
+impl std::fmt::Display for PointerType {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for CastExpr {
+impl std::fmt::Display for ArrayType {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for ContinueExpr {
+impl std::fmt::Display for SliceType {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for EffectExpr {
+impl std::fmt::Display for ReferenceType {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for FieldExpr {
+impl std::fmt::Display for PlaceholderType {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for ForExpr {
+impl std::fmt::Display for FnPointerType {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for IfExpr {
+impl std::fmt::Display for ForType {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for IndexExpr {
+impl std::fmt::Display for ImplTraitType {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for Label {
+impl std::fmt::Display for DynTraitType {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for ClosureExpr {
+impl std::fmt::Display for TupleExpr {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for LoopExpr {
+impl std::fmt::Display for ArrayExpr {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for MatchExpr {
+impl std::fmt::Display for ParenExpr {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for MethodCallExpr {
+impl std::fmt::Display for PathExpr {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for ParenExpr {
+impl std::fmt::Display for LambdaExpr {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for PathExpr {
+impl std::fmt::Display for IfExpr {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for PrefixExpr {
+impl std::fmt::Display for Condition {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for RangeExpr {
+impl std::fmt::Display for EffectExpr {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for RecordExpr {
+impl std::fmt::Display for Label {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for RefExpr {
+impl std::fmt::Display for LoopExpr {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for ReturnExpr {
+impl std::fmt::Display for ForExpr {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for TryExpr {
+impl std::fmt::Display for WhileExpr {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for TupleExpr {
+impl std::fmt::Display for ContinueExpr {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for WhileExpr {
+impl std::fmt::Display for BreakExpr {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for RecordExprFieldList {
+impl std::fmt::Display for ReturnExpr {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for RecordExprField {
+impl std::fmt::Display for CallExpr {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
@@ -3835,97 +3829,97 @@ impl std::fmt::Display for ArgList {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for TypeArgList {
+impl std::fmt::Display for MethodCallExpr {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for Condition {
+impl std::fmt::Display for TypeArgList {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for MatchArmList {
+impl std::fmt::Display for FieldExpr {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for MatchArm {
+impl std::fmt::Display for IndexExpr {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for MatchGuard {
+impl std::fmt::Display for AwaitExpr {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for ArrayType {
+impl std::fmt::Display for TryExpr {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for DynTraitType {
+impl std::fmt::Display for CastExpr {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for FnPointerType {
+impl std::fmt::Display for RefExpr {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for ForType {
+impl std::fmt::Display for PrefixExpr {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for ImplTraitType {
+impl std::fmt::Display for BoxExpr {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for InferType {
+impl std::fmt::Display for RangeExpr {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for NeverType {
+impl std::fmt::Display for BinExpr {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for ParenType {
+impl std::fmt::Display for MatchExpr {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for PathType {
+impl std::fmt::Display for MatchArmList {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for PointerType {
+impl std::fmt::Display for MatchArm {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for ReferenceType {
+impl std::fmt::Display for MatchGuard {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for SliceType {
+impl std::fmt::Display for RecordExpr {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for TupleType {
+impl std::fmt::Display for RecordExprFieldList {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for TypeBound {
+impl std::fmt::Display for RecordExprField {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
@@ -4030,6 +4024,26 @@ impl std::fmt::Display for MacroStmts {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
+impl std::fmt::Display for TypeBound {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        std::fmt::Display::fmt(self.syntax(), f)
+    }
+}
+impl std::fmt::Display for WherePred {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        std::fmt::Display::fmt(self.syntax(), f)
+    }
+}
+impl std::fmt::Display for ExprStmt {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        std::fmt::Display::fmt(self.syntax(), f)
+    }
+}
+impl std::fmt::Display for LetStmt {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        std::fmt::Display::fmt(self.syntax(), f)
+    }
+}
 impl std::fmt::Display for PathSegment {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
diff --git a/crates/ra_syntax/src/ast/make.rs b/crates/ra_syntax/src/ast/make.rs
index 3d4fed64ca..509e8ae7a0 100644
--- a/crates/ra_syntax/src/ast/make.rs
+++ b/crates/ra_syntax/src/ast/make.rs
@@ -17,7 +17,7 @@ pub fn name_ref(text: &str) -> ast::NameRef {
     ast_from_text(&format!("fn f() {{ {}; }}", text))
 }
 
-pub fn type_ref(text: &str) -> ast::Type {
+pub fn type_ref(text: &str) -> ast::TypeRef {
     ast_from_text(&format!("impl {} for D {{}};", text))
 }
 
@@ -75,7 +75,7 @@ pub fn record_field(name: ast::NameRef, expr: Option<ast::Expr>) -> ast::RecordE
     }
 }
 
-pub fn record_field_def(name: ast::NameRef, ty: ast::Type) -> ast::RecordField {
+pub fn record_field_def(name: ast::NameRef, ty: ast::TypeRef) -> ast::RecordField {
     ast_from_text(&format!("struct S {{ {}: {}, }}", name, ty))
 }
 
diff --git a/crates/ra_syntax/src/ast/node_ext.rs b/crates/ra_syntax/src/ast/node_ext.rs
index 69726fb93f..bba7310ade 100644
--- a/crates/ra_syntax/src/ast/node_ext.rs
+++ b/crates/ra_syntax/src/ast/node_ext.rs
@@ -82,7 +82,7 @@ impl ast::Attr {
 #[derive(Debug, Clone, PartialEq, Eq)]
 pub enum PathSegmentKind {
     Name(ast::NameRef),
-    Type { type_ref: Option<ast::Type>, trait_ref: Option<ast::PathType> },
+    Type { type_ref: Option<ast::TypeRef>, trait_ref: Option<ast::PathType> },
     SelfKw,
     SuperKw,
     CrateKw,
@@ -108,8 +108,8 @@ impl ast::PathSegment {
                     // <T> or <T as Trait>
                     // T is any TypeRef, Trait has to be a PathType
                     let mut type_refs =
-                        self.syntax().children().filter(|node| ast::Type::can_cast(node.kind()));
-                    let type_ref = type_refs.next().and_then(ast::Type::cast);
+                        self.syntax().children().filter(|node| ast::TypeRef::can_cast(node.kind()));
+                    let type_ref = type_refs.next().and_then(ast::TypeRef::cast);
                     let trait_ref = type_refs.next().and_then(ast::PathType::cast);
                     PathSegmentKind::Type { type_ref, trait_ref }
                 }
@@ -136,21 +136,21 @@ impl ast::UseTreeList {
 }
 
 impl ast::Impl {
-    pub fn target_type(&self) -> Option<ast::Type> {
+    pub fn target_type(&self) -> Option<ast::TypeRef> {
         match self.target() {
             (Some(t), None) | (_, Some(t)) => Some(t),
             _ => None,
         }
     }
 
-    pub fn target_trait(&self) -> Option<ast::Type> {
+    pub fn target_trait(&self) -> Option<ast::TypeRef> {
         match self.target() {
             (Some(t), Some(_)) => Some(t),
             _ => None,
         }
     }
 
-    fn target(&self) -> (Option<ast::Type>, Option<ast::Type>) {
+    fn target(&self) -> (Option<ast::TypeRef>, Option<ast::TypeRef>) {
         let mut types = support::children(self.syntax());
         let first = types.next();
         let second = types.next();
@@ -362,6 +362,26 @@ impl ast::TypeBound {
             unreachable!()
         }
     }
+
+    pub fn const_question_token(&self) -> Option<SyntaxToken> {
+        self.syntax()
+            .children_with_tokens()
+            .filter_map(|it| it.into_token())
+            .take_while(|it| it.kind() != T![const])
+            .find(|it| it.kind() == T![?])
+    }
+
+    pub fn question_token(&self) -> Option<SyntaxToken> {
+        if self.const_token().is_some() {
+            self.syntax()
+                .children_with_tokens()
+                .filter_map(|it| it.into_token())
+                .skip_while(|it| it.kind() != T![const])
+                .find(|it| it.kind() == T![?])
+        } else {
+            support::token(&self.syntax, T![?])
+        }
+    }
 }
 
 pub enum VisibilityKind {
diff --git a/crates/ra_syntax/src/lib.rs b/crates/ra_syntax/src/lib.rs
index 8a4d453862..6203b62064 100644
--- a/crates/ra_syntax/src/lib.rs
+++ b/crates/ra_syntax/src/lib.rs
@@ -194,7 +194,7 @@ impl ast::Item {
     }
 }
 
-impl ast::Type {
+impl ast::TypeRef {
     /// Returns `text`, parsed as an type reference, but only if it has no errors.
     pub fn parse(text: &str) -> Result<Self, ()> {
         parsing::parse_text_fragment(text, ra_parser::FragmentKind::Type)
diff --git a/docs/dev/README.md b/docs/dev/README.md
index 2896d333ee..417352c9dd 100644
--- a/docs/dev/README.md
+++ b/docs/dev/README.md
@@ -166,12 +166,6 @@ That said, adding an innocent-looking `pub use` is a very simple way to break en
 Note: if you enjoyed this abstract hand-waving about boundaries, you might appreciate
 https://www.tedinski.com/2018/02/06/system-boundaries.html
 
-## Crates.io Dependencies
-
-We try to be very conservative with usage of crates.io dependencies.
-Don't use small "helper" crates (exception: `itertools` is allowed).
-If there's some general reusable bit of code you need, consider adding it to the `stdx` crate.
-
 ## Minimal Tests
 
 Most tests in rust-analyzer start with a snippet of Rust code.
diff --git a/editors/code/src/debug.ts b/editors/code/src/debug.ts
index 925126a16f..bd92c5b6d7 100644
--- a/editors/code/src/debug.ts
+++ b/editors/code/src/debug.ts
@@ -87,17 +87,9 @@ async function getDebugConfiguration(ctx: Ctx, runnable: ra.Runnable): Promise<v
         debugOutput.show(true);
     }
 
-    const isMultiFolderWorkspace = vscode.workspace.workspaceFolders!.length > 1;
-    const firstWorkspace = vscode.workspace.workspaceFolders![0]; // folder exists or RA is not active.
-    const workspace = !isMultiFolderWorkspace || !runnable.args.workspaceRoot ?
-        firstWorkspace :
-        vscode.workspace.workspaceFolders!.find(w => runnable.args.workspaceRoot?.includes(w.uri.fsPath)) || firstWorkspace;
-
-    const wsFolder = path.normalize(workspace.uri.fsPath);
-    const workspaceQualifier = isMultiFolderWorkspace ? `:${workspace.name}` : '';
+    const wsFolder = path.normalize(vscode.workspace.workspaceFolders![0].uri.fsPath); // folder exists or RA is not active.
     function simplifyPath(p: string): string {
-        // see https://github.com/rust-analyzer/rust-analyzer/pull/5513#issuecomment-663458818 for why this is needed
-        return path.normalize(p).replace(wsFolder, '${workspaceFolder' + workspaceQualifier + '}');
+        return path.normalize(p).replace(wsFolder, '${workspaceRoot}');
     }
 
     const executable = await getDebugExecutable(runnable);
diff --git a/xtask/src/ast_src.rs b/xtask/src/ast_src.rs
index 427406249c..114898e383 100644
--- a/xtask/src/ast_src.rs
+++ b/xtask/src/ast_src.rs
@@ -117,7 +117,7 @@ pub(crate) const KINDS_SRC: KindsSrc = KindsSrc {
         "ARRAY_TYPE",
         "SLICE_TYPE",
         "REFERENCE_TYPE",
-        "INFER_TYPE",
+        "PLACEHOLDER_TYPE",
         "FN_POINTER_TYPE",
         "FOR_TYPE",
         "IMPL_TRAIT_TYPE",
@@ -144,7 +144,7 @@ pub(crate) const KINDS_SRC: KindsSrc = KindsSrc {
         "ARRAY_EXPR",
         "PAREN_EXPR",
         "PATH_EXPR",
-        "CLOSURE_EXPR",
+        "LAMBDA_EXPR",
         "IF_EXPR",
         "WHILE_EXPR",
         "CONDITION",
diff --git a/xtask/src/codegen/gen_syntax.rs b/xtask/src/codegen/gen_syntax.rs
index 0595386969..45b788bdba 100644
--- a/xtask/src/codegen/gen_syntax.rs
+++ b/xtask/src/codegen/gen_syntax.rs
@@ -153,10 +153,25 @@ fn generate_nodes(kinds: KindsSrc<'_>, grammar: &AstSrc) -> Result<String> {
                 quote!(impl ast::#trait_name for #name {})
             });
 
-            let ast_node = if en.name == "Stmt" {
-                quote! {}
-            } else {
+            (
                 quote! {
+                    #[pretty_doc_comment_placeholder_workaround]
+                    #[derive(Debug, Clone, PartialEq, Eq, Hash)]
+                    pub enum #name {
+                        #(#variants(#variants),)*
+                    }
+
+                    #(#traits)*
+                },
+                quote! {
+                    #(
+                    impl From<#variants> for #name {
+                        fn from(node: #variants) -> #name {
+                            #name::#variants(node)
+                        }
+                    }
+                    )*
+
                     impl AstNode for #name {
                         fn can_cast(kind: SyntaxKind) -> bool {
                             match kind {
@@ -181,28 +196,6 @@ fn generate_nodes(kinds: KindsSrc<'_>, grammar: &AstSrc) -> Result<String> {
                             }
                         }
                     }
-                }
-            };
-
-            (
-                quote! {
-                    #[pretty_doc_comment_placeholder_workaround]
-                    #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-                    pub enum #name {
-                        #(#variants(#variants),)*
-                    }
-
-                    #(#traits)*
-                },
-                quote! {
-                    #(
-                        impl From<#variants> for #name {
-                            fn from(node: #variants) -> #name {
-                                #name::#variants(node)
-                            }
-                        }
-                    )*
-                    #ast_node
                 },
             )
         })
@@ -483,13 +476,7 @@ impl Field {
                 };
                 format_ident!("{}_token", name)
             }
-            Field::Node { name, .. } => {
-                if name == "type" {
-                    format_ident!("ty")
-                } else {
-                    format_ident!("{}", name)
-                }
-            }
+            Field::Node { name, .. } => format_ident!("{}", name),
         }
     }
     fn ty(&self) -> proc_macro2::Ident {
@@ -504,7 +491,13 @@ fn lower(grammar: &Grammar) -> AstSrc {
     let mut res = AstSrc::default();
     res.tokens = vec!["Whitespace".into(), "Comment".into(), "String".into(), "RawString".into()];
 
-    let nodes = grammar.iter().collect::<Vec<_>>();
+    let nodes = grammar
+        .iter()
+        .filter(|&node| match grammar[node].rule {
+            Rule::Node(it) if it == node => false,
+            _ => true,
+        })
+        .collect::<Vec<_>>();
 
     for &node in &nodes {
         let name = grammar[node].name.clone();
@@ -579,21 +572,6 @@ fn lower_rule(acc: &mut Vec<Field>, grammar: &Grammar, label: Option<&String>, r
         }
         Rule::Labeled { label: l, rule } => {
             assert!(label.is_none());
-            let manually_implemented = matches!(
-                l.as_str(),
-                "lhs"
-                    | "rhs"
-                    | "then_branch"
-                    | "else_branch"
-                    | "start"
-                    | "end"
-                    | "op"
-                    | "index"
-                    | "base"
-            );
-            if manually_implemented {
-                return;
-            }
             lower_rule(acc, grammar, Some(l), rule);
         }
         Rule::Seq(rules) | Rule::Alt(rules) => {
@@ -709,9 +687,6 @@ fn extract_struct_trait(node: &mut AstNodeSrc, trait_name: &str, methods: &[&str
 
 fn extract_enum_traits(ast: &mut AstSrc) {
     for enm in &mut ast.enums {
-        if enm.name == "Stmt" {
-            continue;
-        }
         let nodes = &ast.nodes;
         let mut variant_traits = enm
             .variants
diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram
index aef07cb1e8..375df301f3 100644
--- a/xtask/src/codegen/rust.ungram
+++ b/xtask/src/codegen/rust.ungram
@@ -61,22 +61,22 @@ ParamList =
 SelfParam =
   Attr* (
     ('&' 'lifetime'?)? 'mut'? 'self'
-  | 'mut'? 'self' ':' Type
+  | 'mut'? 'self' ':' ty:TypeRef
   )
 
 Param =
   Attr* (
-    Pat (':' Type)
-  | Type
+    Pat (':' ty:TypeRef)
+  | ty:TypeRef
   | '...'
   )
 
 RetType =
-  '->' Type
+  '->' ty:TypeRef
 
 TypeAlias =
   Attr* Visibility? 'default'? 'type' Name GenericParamList? (':' TypeBoundList?)? WhereClause?
-  '=' Type ';'
+  '=' ty:TypeRef ';'
 
 Struct =
   Attr* Visibility? 'struct' Name GenericParamList? (
@@ -88,13 +88,13 @@ RecordFieldList =
  '{' fields:(RecordField (',' RecordField)* ','?)? '}'
 
 RecordField =
-  Attr* Visibility? Name ':' Type
+  Attr* Visibility? Name ':' ty:TypeRef
 
 TupleFieldList =
   '(' fields:(TupleField (',' TupleField)* ','?)? ')'
 
 TupleField =
-  Attr* Visibility? Type
+  Attr* Visibility? ty:TypeRef
 
 FieldList =
   RecordFieldList
@@ -114,17 +114,12 @@ Union =
   Attr* Visibility? 'union' Name GenericParamList? WhereClause?
   RecordFieldList
 
-AdtDef =
-  Enum
-| Struct
-| Union
-
 Const =
-  Attr* Visibility? 'default'? 'const' (Name | '_') ':' Type
+  Attr* Visibility? 'default'? 'const' (Name | '_') ':' ty:TypeRef
   '=' body:Expr ';'
 
 Static =
-  Attr* Visibility? 'static'? 'mut'? Name ':' Type
+  Attr* Visibility? 'static'? 'mut'? Name ':' ty:TypeRef
   '=' body:Expr ';'
 
 Trait =
@@ -136,16 +131,16 @@ AssocItemList =
   '{' Attr* AssocItem* '}'
 
 AssocItem =
-  Const
-| Fn
-| MacroCall
+  Fn
 | TypeAlias
+| Const
+| MacroCall
 
 Impl =
  Attr* Visibility?
  'default'? 'unsafe'? 'impl' 'const'? GenericParamList? (
-   Type
- | '!'? Type 'for' Type
+   TypeRef
+ | '!'? TypeRef 'for' TypeRef
  ) WhereClause?
  AssocItemList
 
@@ -162,26 +157,20 @@ GenericParamList =
   '<' (GenericParam (',' GenericParam)* ','?)? '>'
 
 GenericParam =
-  ConstParam
-| LifetimeParam
+  LifetimeParam
 | TypeParam
+| ConstParam
 
 TypeParam =
   Attr* Name (':' TypeBoundList?)?
-  ('=' default_type:Type)?
+  ('=' default_type:TypeRef)?
 
 ConstParam =
-  Attr* 'const' Name ':' Type
+  Attr* 'const' Name ':' ty:TypeRef
   ('=' default_val:Expr)?
 
 LifetimeParam =
-  Attr* 'lifetime' (':' TypeBoundList?)?
-
-WhereClause =
-  'where' predicates:(WherePred (',' WherePred)* ','?)
-
-WherePred =
-  ('for' GenericParamList)?  ('lifetime' | Type) ':' TypeBoundList
+  Attr* 'lifetime'
 
 Visibility =
   'pub' ('('
@@ -194,250 +183,168 @@ Visibility =
 Attr =
   '#' '!'? '[' Path ('=' Literal | TokenTree)? ']'
 
-Stmt =
-  ExprStmt
-| Item
-| LetStmt
-
-LetStmt =
-  Attr* 'let' Pat (':' Type)?
-  '=' initializer:Expr ';'
-
-ExprStmt =
-  Attr* Expr ';'?
-
-Expr =
-  ArrayExpr
-| AwaitExpr
-| BinExpr
-| BlockExpr
-| BoxExpr
-| BreakExpr
-| CallExpr
-| CastExpr
-| ContinueExpr
-| EffectExpr
-| FieldExpr
-| ForExpr
-| IfExpr
-| IndexExpr
-| Label
-| ClosureExpr
-| Literal
-| LoopExpr
-| MacroCall
-| MatchExpr
-| MethodCallExpr
-| ParenExpr
-| PathExpr
-| PrefixExpr
-| RangeExpr
-| RecordExpr
-| RefExpr
-| ReturnExpr
-| TryExpr
-| TupleExpr
-| WhileExpr
+ParenType =
+  '(' ty:TypeRef ')'
 
-Literal =
-  Attr* 'int_number'
+TupleType =
+  '(' fields:TypeRef* ')'
 
-PathExpr =
-  Attr* Path
+NeverType =
+  '!'
 
-BlockExpr =
-  '{'
-    Attr*
-    statements:Stmt*
-    Expr?
-  '}'
+PathType =
+  Path
 
-RefExpr =
-  Attr* '&' ('raw' |'mut' | 'const') Expr
+PointerType =
+  '*' ('const' | 'mut') ty:TypeRef
 
-TryExpr =
-  Attr* Expr '?'
+ArrayType =
+  '[' ty:TypeRef ';' Expr ']'
 
-EffectExpr =
-  Attr* Label? ('try' | 'unsafe' | 'async') BlockExpr
+SliceType =
+  '[' ty:TypeRef ']'
 
-PrefixExpr =
-  Attr* op:('-' | '!' | '*') Expr
+ReferenceType =
+  '&' 'lifetime'? 'mut'? ty:TypeRef
 
-BinExpr =
-  Attr*
-  lhs:Expr
-  op:(
-    '||' | '&&'
-    | '==' | '!=' | '<=' | '>=' | '<' | '>'
-    | '+' | '*' | '-' | '/' | '%' | '<<' | '>>' | '^' | '|' | '&'
-    | '=' | '+=' | '/=' | '*=' | '%=' | '>>=' | '<<=' | '-=' | '|=' | '&=' | '^='
-  )
-  rhs:Expr
+PlaceholderType =
+   '_'
 
-CastExpr =
-  Attr* Expr 'as' Type
+FnPointerType =
+   Abi 'unsafe'? 'fn' ParamList RetType?
 
-ParenExpr =
-  Attr* '(' Attr* Expr ')'
+ForType =
+   'for' GenericParamList ty:TypeRef
 
-ArrayExpr =
-  Attr* '[' Attr* (
-    (Expr (',' Expr)* ','?)?
-  | Expr ';' Expr
-  ) ']'
+ImplTraitType =
+  'impl' TypeBoundList
 
-IndexExpr =
-  Attr* base:Expr '[' index:Expr ']'
+DynTraitType =
+  'dyn' TypeBoundList
 
 TupleExpr =
-  Attr* '(' Attr* (Expr (',' Expr)* ','?)? ')'
-
-RecordExpr =
-  Path RecordExprFieldList
-
-RecordExprFieldList =
-  '{'
-    Attr*
-    fields:(RecordExprField (',' RecordExprField)* ','?)
-    ('..' spread:Expr)?
-  '}'
-
-RecordExprField =
-  Attr* NameRef (':' Expr)?
+  Attr* '(' Expr* ')'
 
-CallExpr =
-  Attr* Expr ArgList
-
-ArgList =
-  '(' args:(Expr (',' Expr)* ','?)? ')'
+ArrayExpr =
+  Attr* '[' (Expr* | Expr ';' Expr) ']'
 
-MethodCallExpr =
-  Attr* Expr '.' NameRef TypeArgList? ArgList
+ParenExpr =
+  Attr* '(' Expr ')'
 
-FieldExpr =
-  Attr* Expr '.' NameRef
+PathExpr =
+  Path
 
-ClosureExpr =
+LambdaExpr =
   Attr* 'static'? 'async'? 'move'?  ParamList RetType?
   body:Expr
 
 IfExpr =
-  Attr* 'if' Condition then_branch:BlockExpr
-  ('else' else_branch:(IfExpr | BlockExpr))?
+  Attr* 'if' Condition
 
 Condition =
   'let' Pat '=' Expr
 | Expr
 
+EffectExpr =
+  Attr* Label? ('try' | 'unsafe' | 'async') BlockExpr
+
 LoopExpr =
   Attr* Label? 'loop'
-  loop_body:BlockExpr
+  loop_body:BlockExpr?
 
 ForExpr =
   Attr* Label? 'for' Pat 'in' iterable:Expr
-  loop_body:BlockExpr
+  loop_body:BlockExpr?
 
 WhileExpr =
   Attr* Label? 'while' Condition
   loop_body:BlockExpr?
 
-Label =
-  'lifetime'
-
-BreakExpr =
-  Attr* 'break' 'lifetime'? Expr?
-
 ContinueExpr =
   Attr* 'continue' 'lifetime'?
 
-RangeExpr =
-  Attr* start:Expr? op:('..' | '..=') end:Expr?
+BreakExpr =
+  Attr* 'break' 'lifetime'? Expr?
 
-MatchExpr =
-  Attr* 'match' Expr MatchArmList
+Label =
+  'lifetime'
 
-MatchArmList =
+BlockExpr =
+  Attr* Label
   '{'
-    Attr*
-    arms:MatchArm*
+    Item*
+    statements:Stmt*
+    Expr?
   '}'
 
-MatchArm =
-  Attr* Pat guard:MatchGuard? '=>' Expr ','?
+ReturnExpr =
+  Attr* 'return' Expr
 
-MatchGuard =
-  'if' Expr
+CallExpr =
+  Attr* Expr ArgList
 
-ReturnExpr =
-  Attr* 'return' Expr?
+MethodCallExpr =
+  Attr* Expr '.' NameRef TypeArgList? ArgList
 
-AwaitExpr =
-  Attr* Expr '.' 'await'
+ArgList =
+  '(' args:Expr* ')'
 
-BoxExpr =
-  Attr* 'box' Expr
+FieldExpr =
+  Attr* Expr '.' NameRef
 
-Type =
-  ArrayType
-| DynTraitType
-| FnPointerType
-| ForType
-| ImplTraitType
-| InferType
-| NeverType
-| ParenType
-| PathType
-| PointerType
-| ReferenceType
-| SliceType
-| TupleType
+IndexExpr =
+  Attr* '[' ']'
 
-ParenType =
-  '(' Type ')'
+AwaitExpr =
+  Attr* Expr '.' 'await'
 
-NeverType =
-  '!'
+TryExpr =
+  Attr* Expr '?'
 
-PathType =
-  Path
+CastExpr =
+  Attr* Expr 'as' ty:TypeRef
 
-TupleType =
-  '(' fields:(Type (',' Type)* ','?)? ')'
+RefExpr =
+  Attr* '&' ('raw' | 'mut' | 'const') Expr
 
-PointerType =
-  '*' ('const' | 'mut') Type
+PrefixExpr =
+  Attr* Expr
 
-ReferenceType =
-  '&' 'lifetime'? 'mut'? Type
+BoxExpr =
+  Attr* 'box' Expr
 
-ArrayType =
-  '[' Type ';' Expr ']'
+RangeExpr =
+  Attr*
 
-SliceType =
-  '[' Type ']'
+BinExpr =
+  Attr*
 
-InferType =
-   '_'
+Literal =
+  'int_number'
 
-FnPointerType =
-   'const'? 'async'? 'unsafe'? Abi? 'fn' ParamList RetType?
+MatchExpr =
+  Attr* 'match' Expr MatchArmList
 
-ForType =
-   'for' GenericParamList Type
+MatchArmList =
+  '{' arms:MatchArm* '}'
 
-ImplTraitType =
-  'impl' TypeBoundList
+MatchArm =
+  Attr* Pat guard:MatchGuard? '=>' Expr
 
-DynTraitType =
-  'dyn' TypeBoundList
+MatchGuard =
+  'if' Expr
 
-TypeBoundList =
-   bounds:(TypeBound ('+' TypeBound)* '+'?)
+RecordExpr =
+ Path RecordExprFieldList
 
-TypeBound =
-  'lifetime'
-| '?'? Type
+RecordExprFieldList =
+  '{'
+    fields:RecordExprField*
+    ('..' spread:Expr)?
+  '}'
+
+RecordExprField =
+  Attr* NameRef (':' Expr)?
 
 OrPat =
   Pat*
@@ -516,6 +423,25 @@ MacroStmts =
   statements:Stmt*
   Expr?
 
+TypeBound =
+  'lifetime' | 'const'? TypeRef
+
+TypeBoundList =
+   bounds:TypeBound*
+
+WherePred =
+  ('for' GenericParamList)?  ('lifetime' | TypeRef) ':' TypeBoundList
+
+WhereClause =
+  'where' predicates:WherePred*
+
+ExprStmt =
+  Attr* Expr ';'
+
+LetStmt =
+  Attr* 'let' Pat (':' ty:TypeRef)
+  '=' initializer:Expr ';'
+
 Path =
   (qualifier:Path '::')? segment:PathSegment
 
@@ -532,10 +458,10 @@ TypeArgList =
   '>'
 
 TypeArg =
-  Type
+  TypeRef
 
 AssocTypeArg =
-  NameRef (':' TypeBoundList | '=' Type)
+  NameRef (':' TypeBoundList | '=' TypeRef)
 
 LifetimeArg =
   'lifetime'
@@ -543,6 +469,30 @@ LifetimeArg =
 ConstArg =
   Literal | BlockExpr BlockExpr
 
+AdtDef =
+  Struct
+| Enum
+| Union
+
+TypeRef =
+  ParenType
+| TupleType
+| NeverType
+| PathType
+| PointerType
+| ArrayType
+| SliceType
+| ReferenceType
+| PlaceholderType
+| FnPointerType
+| ForType
+| ImplTraitType
+| DynTraitType
+
+Stmt =
+  LetStmt
+| ExprStmt
+
 Pat =
   OrPat
 | ParenPat
@@ -559,3 +509,36 @@ Pat =
 | RangePat
 | LiteralPat
 | MacroPat
+
+Expr =
+  TupleExpr
+| ArrayExpr
+| ParenExpr
+| PathExpr
+| LambdaExpr
+| IfExpr
+| LoopExpr
+| ForExpr
+| WhileExpr
+| ContinueExpr
+| BreakExpr
+| Label
+| BlockExpr
+| ReturnExpr
+| MatchExpr
+| RecordExpr
+| CallExpr
+| IndexExpr
+| MethodCallExpr
+| FieldExpr
+| AwaitExpr
+| TryExpr
+| EffectExpr
+| CastExpr
+| RefExpr
+| PrefixExpr
+| RangeExpr
+| BinExpr
+| Literal
+| MacroCall
+| BoxExpr


Test patch:
diff --git a/crates/ra_syntax/src/tests.rs b/crates/ra_syntax/src/tests.rs
index 00b957f434..68cee89149 100644
--- a/crates/ra_syntax/src/tests.rs
+++ b/crates/ra_syntax/src/tests.rs
@@ -98,7 +98,7 @@ fn type_parser_tests() {
     fragment_parser_dir_test(
         &["parser/fragments/type/ok"],
         &["parser/fragments/type/err"],
-        crate::ast::Type::parse,
+        crate::ast::TypeRef::parse,
     );
 }
 
diff --git a/crates/ra_syntax/test_data/parser/err/0010_unsafe_lambda_block.rast b/crates/ra_syntax/test_data/parser/err/0010_unsafe_lambda_block.rast
index e0f1d0c274..1c3e0f65bf 100644
--- a/crates/ra_syntax/test_data/parser/err/0010_unsafe_lambda_block.rast
+++ b/crates/ra_syntax/test_data/parser/err/0010_unsafe_lambda_block.rast
@@ -12,7 +12,7 @@ SOURCE_FILE@0..42
       L_CURLY@10..11 "{"
       WHITESPACE@11..16 "\n    "
       EXPR_STMT@16..24
-        CLOSURE_EXPR@16..24
+        LAMBDA_EXPR@16..24
           PARAM_LIST@16..18
             PIPE@16..17 "|"
             PIPE@17..18 "|"
diff --git a/crates/ra_syntax/test_data/parser/err/0012_broken_lambda.rast b/crates/ra_syntax/test_data/parser/err/0012_broken_lambda.rast
index 0afa24b775..d62906b99b 100644
--- a/crates/ra_syntax/test_data/parser/err/0012_broken_lambda.rast
+++ b/crates/ra_syntax/test_data/parser/err/0012_broken_lambda.rast
@@ -117,7 +117,7 @@ SOURCE_FILE@0..389
         WHITESPACE@140..141
         EQ@141..142
         WHITESPACE@142..143
-        CLOSURE_EXPR@143..389
+        LAMBDA_EXPR@143..389
           PARAM_LIST@143..388
             PIPE@143..144
             PARAM@144..159
diff --git a/crates/ra_syntax/test_data/parser/err/0039_lambda_recovery.rast b/crates/ra_syntax/test_data/parser/err/0039_lambda_recovery.rast
index 0678d42781..a98c31b0c7 100644
--- a/crates/ra_syntax/test_data/parser/err/0039_lambda_recovery.rast
+++ b/crates/ra_syntax/test_data/parser/err/0039_lambda_recovery.rast
@@ -49,7 +49,7 @@ SOURCE_FILE@0..83
               IDENT@48..51 "map"
             ARG_LIST@51..57
               L_PAREN@51..52 "("
-              CLOSURE_EXPR@52..56
+              LAMBDA_EXPR@52..56
                 PARAM_LIST@52..56
                   PIPE@52..53 "|"
                   PARAM@53..55
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0023_placeholder_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0023_placeholder_type.rast
index e4fe2b948b..57008e5fea 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0023_placeholder_type.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0023_placeholder_type.rast
@@ -7,7 +7,7 @@ SOURCE_FILE@0..22
     WHITESPACE@16..17 " "
     EQ@17..18 "="
     WHITESPACE@18..19 " "
-    INFER_TYPE@19..20
+    PLACEHOLDER_TYPE@19..20
       UNDERSCORE@19..20 "_"
     SEMICOLON@20..21 ";"
   WHITESPACE@21..22 "\n"
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0106_lambda_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0106_lambda_expr.rast
index a80d79563a..51a6c51708 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0106_lambda_expr.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0106_lambda_expr.rast
@@ -12,7 +12,7 @@ SOURCE_FILE@0..134
       L_CURLY@9..10 "{"
       WHITESPACE@10..15 "\n    "
       EXPR_STMT@15..21
-        CLOSURE_EXPR@15..20
+        LAMBDA_EXPR@15..20
           PARAM_LIST@15..17
             PIPE@15..16 "|"
             PIPE@16..17 "|"
@@ -23,7 +23,7 @@ SOURCE_FILE@0..134
         SEMICOLON@20..21 ";"
       WHITESPACE@21..26 "\n    "
       EXPR_STMT@26..43
-        CLOSURE_EXPR@26..42
+        LAMBDA_EXPR@26..42
           PARAM_LIST@26..28
             PIPE@26..27 "|"
             PIPE@27..28 "|"
@@ -47,7 +47,7 @@ SOURCE_FILE@0..134
         SEMICOLON@42..43 ";"
       WHITESPACE@43..48 "\n    "
       EXPR_STMT@48..54
-        CLOSURE_EXPR@48..53
+        LAMBDA_EXPR@48..53
           PARAM_LIST@48..51
             PIPE@48..49 "|"
             PARAM@49..50
@@ -64,7 +64,7 @@ SOURCE_FILE@0..134
         SEMICOLON@53..54 ";"
       WHITESPACE@54..59 "\n    "
       EXPR_STMT@59..76
-        CLOSURE_EXPR@59..75
+        LAMBDA_EXPR@59..75
           MOVE_KW@59..63 "move"
           WHITESPACE@63..64 " "
           PARAM_LIST@64..73
@@ -91,7 +91,7 @@ SOURCE_FILE@0..134
         SEMICOLON@75..76 ";"
       WHITESPACE@76..81 "\n    "
       EXPR_STMT@81..93
-        CLOSURE_EXPR@81..92
+        LAMBDA_EXPR@81..92
           ASYNC_KW@81..86 "async"
           WHITESPACE@86..87 " "
           PARAM_LIST@87..89
@@ -104,7 +104,7 @@ SOURCE_FILE@0..134
         SEMICOLON@92..93 ";"
       WHITESPACE@93..98 "\n    "
       EXPR_STMT@98..109
-        CLOSURE_EXPR@98..108
+        LAMBDA_EXPR@98..108
           MOVE_KW@98..102 "move"
           WHITESPACE@102..103 " "
           PARAM_LIST@103..105
@@ -117,7 +117,7 @@ SOURCE_FILE@0..134
         SEMICOLON@108..109 ";"
       WHITESPACE@109..114 "\n    "
       EXPR_STMT@114..131
-        CLOSURE_EXPR@114..130
+        LAMBDA_EXPR@114..130
           ASYNC_KW@114..119 "async"
           WHITESPACE@119..120 " "
           MOVE_KW@120..124 "move"
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0130_let_stmt.rast b/crates/ra_syntax/test_data/parser/inline/ok/0130_let_stmt.rast
index d2fd6e567a..931e81f274 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0130_let_stmt.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0130_let_stmt.rast
@@ -105,7 +105,7 @@ SOURCE_FILE@0..135
         WHITESPACE@117..118 " "
         EQ@118..119 "="
         WHITESPACE@119..120 " "
-        CLOSURE_EXPR@120..131
+        LAMBDA_EXPR@120..131
           ATTR@120..127
             POUND@120..121 "#"
             L_BRACK@121..122 "["
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0155_closure_params.rast b/crates/ra_syntax/test_data/parser/inline/ok/0155_closure_params.rast
index 0a9f7c1376..c63a55a56b 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0155_closure_params.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0155_closure_params.rast
@@ -20,7 +20,7 @@ SOURCE_FILE@0..63
         WHITESPACE@22..23 " "
         EQ@23..24 "="
         WHITESPACE@24..25 " "
-        CLOSURE_EXPR@25..59
+        LAMBDA_EXPR@25..59
           PARAM_LIST@25..56
             PIPE@25..26 "|"
             PARAM@26..29
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0158_lambda_ret_block.rast b/crates/ra_syntax/test_data/parser/inline/ok/0158_lambda_ret_block.rast
index aa4099a929..9c071ec2e1 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0158_lambda_ret_block.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0158_lambda_ret_block.rast
@@ -13,7 +13,7 @@ SOURCE_FILE@0..34
       WHITESPACE@11..12 " "
       EXPR_STMT@12..31
         CALL_EXPR@12..30
-          CLOSURE_EXPR@12..28
+          LAMBDA_EXPR@12..28
             PARAM_LIST@12..14
               PIPE@12..13 "|"
               PIPE@13..14 "|"
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0164_type_path_in_pattern.rast b/crates/ra_syntax/test_data/parser/inline/ok/0164_type_path_in_pattern.rast
index f8910677b4..f5e20b93dd 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0164_type_path_in_pattern.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0164_type_path_in_pattern.rast
@@ -19,7 +19,7 @@ SOURCE_FILE@0..33
             PATH@16..19
               PATH_SEGMENT@16..19
                 L_ANGLE@16..17 "<"
-                INFER_TYPE@17..18
+                PLACEHOLDER_TYPE@17..18
                   UNDERSCORE@17..18 "_"
                 R_ANGLE@18..19 ">"
             COLON2@19..21 "::"
diff --git a/crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.rast b/crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.rast
index 1d75ed08f0..b04a505ead 100644
--- a/crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0035_weird_exprs.rast
@@ -351,7 +351,7 @@ SOURCE_FILE@0..3813
         WHITESPACE@766..767 " "
         BLOCK_EXPR@767..777
           L_CURLY@767..768 "{"
-          CLOSURE_EXPR@768..776
+          LAMBDA_EXPR@768..776
             PARAM_LIST@768..770
               PIPE@768..769 "|"
               PIPE@769..770 "|"
@@ -1628,7 +1628,7 @@ SOURCE_FILE@0..3813
               CALL_EXPR@2950..2995
                 PAREN_EXPR@2950..2971
                   L_PAREN@2950..2951 "("
-                  CLOSURE_EXPR@2951..2970
+                  LAMBDA_EXPR@2951..2970
                     PARAM_LIST@2951..2968
                       PIPE@2951..2952 "|"
                       PARAM@2952..2962
@@ -1640,10 +1640,10 @@ SOURCE_FILE@0..3813
                         COLON@2956..2957 ":"
                         TUPLE_TYPE@2957..2962
                           L_PAREN@2957..2958 "("
-                          INFER_TYPE@2958..2959
+                          PLACEHOLDER_TYPE@2958..2959
                             UNDERSCORE@2958..2959 "_"
                           COMMA@2959..2960 ","
-                          INFER_TYPE@2960..2961
+                          PLACEHOLDER_TYPE@2960..2961
                             UNDERSCORE@2960..2961 "_"
                           R_PAREN@2961..2962 ")"
                       COMMA@2962..2963 ","
diff --git a/crates/ra_syntax/test_data/parser/ok/0044_let_attrs.rast b/crates/ra_syntax/test_data/parser/ok/0044_let_attrs.rast
index 650f4e3102..c9e6d88eb5 100644
--- a/crates/ra_syntax/test_data/parser/ok/0044_let_attrs.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0044_let_attrs.rast
@@ -52,7 +52,7 @@ SOURCE_FILE@0..166
                   IDENT@134..146 "catch_unwind"
           ARG_LIST@146..162
             L_PAREN@146..147 "("
-            CLOSURE_EXPR@147..161
+            LAMBDA_EXPR@147..161
               MOVE_KW@147..151 "move"
               WHITESPACE@151..152 " "
               PARAM_LIST@152..154