Skip to content

Commit f1db60c

Browse files
committed
Fix rebase issues
1 parent 4425148 commit f1db60c

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/librustc/mir/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ impl<'tcx> Body<'tcx> {
242242
pub fn vars_iter<'a>(&'a self) -> impl Iterator<Item = Local> + 'a {
243243
(self.arg_count + 1..self.local_decls.len()).filter_map(move |index| {
244244
let local = Local::new(index);
245-
self.local_decls[local].is_user_variable().to_option(local)
245+
self.local_decls[local].is_user_variable().then_some(local)
246246
})
247247
}
248248

src/librustc_mir/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ Rust MIR: a lowered representation of Rust. Also: an experiment!
2828
#![feature(associated_type_bounds)]
2929
#![feature(range_is_empty)]
3030
#![feature(stmt_expr_attributes)]
31-
#![feature(bool_to_option)]
3231
#![feature(trait_alias)]
3332
#![feature(matches_macro)]
3433

src/librustc_mir/transform/uninhabited_enum_branching.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ fn get_switched_on_type<'tcx>(
2929
// Only bother checking blocks which terminate by switching on a local.
3030
if let Some(local) = get_discriminant_local(&terminator.kind) {
3131
let stmt_before_term = (block_data.statements.len() > 0)
32-
.then_with(|| &block_data.statements[block_data.statements.len() - 1].kind);
32+
.then(|| &block_data.statements[block_data.statements.len() - 1].kind);
3333

3434
if let Some(StatementKind::Assign(box (l, Rvalue::Discriminant(place)))) = stmt_before_term
3535
{
@@ -59,7 +59,7 @@ fn variant_discriminants<'tcx>(
5959
.iter_enumerated()
6060
.filter_map(|(idx, layout)| {
6161
(layout.abi != Abi::Uninhabited)
62-
.then_with(|| ty.discriminant_for_variant(tcx, idx).unwrap().val)
62+
.then(|| ty.discriminant_for_variant(tcx, idx).unwrap().val)
6363
})
6464
.collect(),
6565
}

src/librustc_parse/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//! The main parser interface.
22
3+
#![feature(bool_to_option)]
34
#![feature(crate_visibility_modifier)]
45

56
use syntax::ast;

0 commit comments

Comments
 (0)