diff --git a/src/closures.rs b/src/closures.rs index 71b07e4b9ee2..3d65077ddc20 100644 --- a/src/closures.rs +++ b/src/closures.rs @@ -151,7 +151,6 @@ fn rewrite_closure_with_block( id: ast::NodeId::root(), kind: ast::StmtKind::Expr(ptr::P(body.clone())), span: body.span, - tokens: None, }], id: ast::NodeId::root(), rules: ast::BlockCheckMode::Default, diff --git a/src/items.rs b/src/items.rs index 7b1bb6ce7be3..9f079f15c151 100644 --- a/src/items.rs +++ b/src/items.rs @@ -2118,7 +2118,7 @@ pub(crate) fn span_hi_for_param(context: &RewriteContext<'_>, param: &ast::Param pub(crate) fn is_named_param(param: &ast::Param) -> bool { if let ast::PatKind::Ident(_, ident, _) = param.pat.kind { - ident.name != symbol::kw::Invalid + ident.name != symbol::kw::Empty } else { true } diff --git a/src/macros.rs b/src/macros.rs index e5a28751988c..119ae61d8dd6 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -158,7 +158,7 @@ fn rewrite_macro_name( format!("{}!", pprust::path_to_string(path)) }; match extra_ident { - Some(ident) if ident.name != kw::Invalid => format!("{} {}", name, ident), + Some(ident) if ident.name != kw::Empty => format!("{} {}", name, ident), _ => name, } }