Fixes for new rustc changes.

This commit is contained in:
Mara Bos 2021-01-01 17:00:52 +01:00 committed by Caleb Cartwright
parent 398d2f96c3
commit 4644418556
3 changed files with 2 additions and 3 deletions

View file

@ -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,

View file

@ -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
}

View file

@ -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,
}
}