Skip to content

Commit

Permalink
Fix rebase issues
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed Dec 6, 2019
1 parent 4425148 commit f1db60c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/librustc/mir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ impl<'tcx> Body<'tcx> {
pub fn vars_iter<'a>(&'a self) -> impl Iterator<Item = Local> + 'a {
(self.arg_count + 1..self.local_decls.len()).filter_map(move |index| {
let local = Local::new(index);
self.local_decls[local].is_user_variable().to_option(local)
self.local_decls[local].is_user_variable().then_some(local)
})
}

Expand Down
1 change: 0 additions & 1 deletion src/librustc_mir/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ Rust MIR: a lowered representation of Rust. Also: an experiment!
#![feature(associated_type_bounds)]
#![feature(range_is_empty)]
#![feature(stmt_expr_attributes)]
#![feature(bool_to_option)]
#![feature(trait_alias)]
#![feature(matches_macro)]

Expand Down
4 changes: 2 additions & 2 deletions src/librustc_mir/transform/uninhabited_enum_branching.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fn get_switched_on_type<'tcx>(
// Only bother checking blocks which terminate by switching on a local.
if let Some(local) = get_discriminant_local(&terminator.kind) {
let stmt_before_term = (block_data.statements.len() > 0)
.then_with(|| &block_data.statements[block_data.statements.len() - 1].kind);
.then(|| &block_data.statements[block_data.statements.len() - 1].kind);

if let Some(StatementKind::Assign(box (l, Rvalue::Discriminant(place)))) = stmt_before_term
{
Expand Down Expand Up @@ -59,7 +59,7 @@ fn variant_discriminants<'tcx>(
.iter_enumerated()
.filter_map(|(idx, layout)| {
(layout.abi != Abi::Uninhabited)
.then_with(|| ty.discriminant_for_variant(tcx, idx).unwrap().val)
.then(|| ty.discriminant_for_variant(tcx, idx).unwrap().val)
})
.collect(),
}
Expand Down
1 change: 1 addition & 0 deletions src/librustc_parse/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! The main parser interface.
#![feature(bool_to_option)]
#![feature(crate_visibility_modifier)]

use syntax::ast;
Expand Down

0 comments on commit f1db60c

Please sign in to comment.