Skip to content

Commit 1530365

Browse files
committed
fix stability hole
1 parent f27a3a3 commit 1530365

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/librustc_front/lowering.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,12 @@ pub fn lower_expr(lctx: &LoweringContext, e: &Expr) -> P<hir::Expr> {
12361236
structpath,
12371237
fields.into_iter().map(|&(s, e)| {
12381238
field(token::intern(s),
1239-
lower_expr(lctx, &**e),
1239+
signal_block_expr(lctx,
1240+
hir_vec![],
1241+
lower_expr(lctx, &**e),
1242+
e.span,
1243+
hir::PopUnstableBlock,
1244+
None),
12401245
ast_expr.span)
12411246
}).collect(),
12421247
None,

src/test/compile-fail/range_inclusive_gate.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@
1414
// #![feature(inclusive_range)]
1515

1616
pub fn main() {
17-
let _: std::ops::RangeInclusive<_> = 1...10;
17+
let _: std::ops::RangeInclusive<_> = { use std::intrinsics; 1 } ... { use std::intrinsics; 2 };
1818
//~^ ERROR use of unstable library feature 'inclusive_range'
19+
//~^^ ERROR core_intrinsics
20+
//~^^^ ERROR core_intrinsics
21+
//~^^^^ WARN unused_imports
22+
//~^^^^^ WARN unused_imports
1923
}
2024

2125

0 commit comments

Comments
 (0)