diff --git a/src/librustc/hir/lowering.rs b/src/librustc/hir/lowering.rs index 0c3c190064b0..ea47b0924bc0 100644 --- a/src/librustc/hir/lowering.rs +++ b/src/librustc/hir/lowering.rs @@ -1260,8 +1260,9 @@ impl<'a> LoweringContext<'a> { maybe_expr.as_ref().map(|x| self.lower_expr(x))) } ExprKind::Paren(ref ex) => { - // merge attributes into the inner expression. return self.lower_expr(ex).map(|mut ex| { + ex.span = e.span; + // merge attributes into the inner expression. ex.attrs.update(|attrs| { attrs.prepend(e.attrs.clone()) });