From 15303650e84e50f0731b2a3fe24d291d82c7bf2f Mon Sep 17 00:00:00 2001 From: Alex Burka Date: Sat, 27 Feb 2016 01:56:38 -0500 Subject: [PATCH] fix stability hole --- src/librustc_front/lowering.rs | 7 ++++++- 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 5e39a7c817ac..665cc72b9faa 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 { 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 630679f27e38..deac152ec85b 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 }