diff options
| -rw-r--r-- | src/librustc_front/lowering.rs | 7 | ||||
| -rw-r--r-- | src/test/compile-fail/range_inclusive_gate.rs | 6 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/librustc_front/lowering.rs b/src/librustc_front/lowering.rs index 5e39a7c817a..665cc72b9fa 100644 --- a/src/librustc_front/lowering.rs +++ b/src/librustc_front/lowering.rs @@ -1236,7 +1236,12 @@ pub fn lower_expr(lctx: &LoweringContext, e: &Expr) -> P<hir::Expr> { structpath, fields.into_iter().map(|&(s, e)| { field(token::intern(s), - lower_expr(lctx, &**e), + signal_block_expr(lctx, + hir_vec![], + lower_expr(lctx, &**e), + e.span, + hir::PopUnstableBlock, + None), ast_expr.span) }).collect(), None, diff --git a/src/test/compile-fail/range_inclusive_gate.rs b/src/test/compile-fail/range_inclusive_gate.rs index 630679f27e3..deac152ec85 100644 --- a/src/test/compile-fail/range_inclusive_gate.rs +++ b/src/test/compile-fail/range_inclusive_gate.rs @@ -14,8 +14,12 @@ // #![feature(inclusive_range)] pub fn main() { - let _: std::ops::RangeInclusive<_> = 1...10; + let _: std::ops::RangeInclusive<_> = { use std::intrinsics; 1 } ... { use std::intrinsics; 2 }; //~^ ERROR use of unstable library feature 'inclusive_range' + //~^^ ERROR core_intrinsics + //~^^^ ERROR core_intrinsics + //~^^^^ WARN unused_imports + //~^^^^^ WARN unused_imports } |
