Skip to content

Commit

Permalink
Fixes for new rustc changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
m-ou-se committed Jan 1, 2021
1 parent 9959566 commit 01dfe55
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/formatting/closures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,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,
Expand Down
2 changes: 1 addition & 1 deletion src/formatting/items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2275,7 +2275,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
}
Expand Down
2 changes: 1 addition & 1 deletion src/formatting/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,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,
}
}
Expand Down

0 comments on commit 01dfe55

Please sign in to comment.