Allowing attributes to be on if let statements

This commit is contained in:
Sebastian Malton 2018-06-06 22:03:42 -04:00
parent 4fe40635ef
commit e7c7f5f071

View File

@ -2597,7 +2597,7 @@ pub fn parse_dot_or_call_expr_with(&mut self,
attrs.extend::<Vec<_>>(expr.attrs.into());
expr.attrs = attrs;
match expr.node {
ExprKind::If(..) | ExprKind::IfLet(..) => {
ExprKind::If(..) => {
if !expr.attrs.is_empty() {
// Just point to the first attribute in there...
let span = expr.attrs[0].span;