librustc_trans: fix fallout
This commit is contained in:
parent
e66ba15764
commit
80a04b1aed
@ -25,6 +25,7 @@
|
||||
#![feature(default_type_params, globs, import_shadowing, macro_rules, phase, quote)]
|
||||
#![feature(slicing_syntax, unsafe_destructor)]
|
||||
#![feature(rustc_diagnostic_macros)]
|
||||
#![feature(unboxed_closures)]
|
||||
|
||||
extern crate arena;
|
||||
extern crate flate;
|
||||
|
@ -771,7 +771,7 @@ fn pick_column_to_specialize(def_map: &DefMap, m: &[Match]) -> Option<uint> {
|
||||
}
|
||||
};
|
||||
|
||||
let column_contains_any_nonwild_patterns: |&uint| -> bool = |&col| {
|
||||
let column_contains_any_nonwild_patterns = |&: &col: &uint| -> bool {
|
||||
m.iter().any(|row| match row.pats[col].node {
|
||||
ast::PatWild(_) => false,
|
||||
_ => true
|
||||
|
@ -17,7 +17,12 @@ pub struct BasicBlock(pub BasicBlockRef);
|
||||
|
||||
impl Copy for BasicBlock {}
|
||||
|
||||
pub type Preds<'a> = Map<Value, BasicBlock, Filter<'a, Value, Users>, fn(Value) -> BasicBlock>;
|
||||
pub type Preds = Map<
|
||||
Value,
|
||||
BasicBlock,
|
||||
Filter<Value, Users, fn(&Value) -> bool>,
|
||||
fn(Value) -> BasicBlock,
|
||||
>;
|
||||
|
||||
/// Wrapper for LLVM BasicBlockRef
|
||||
impl BasicBlock {
|
||||
@ -31,11 +36,12 @@ impl BasicBlock {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn pred_iter(self) -> Preds<'static> {
|
||||
pub fn pred_iter(self) -> Preds {
|
||||
fn is_a_terminator_inst(user: &Value) -> bool { user.is_a_terminator_inst() }
|
||||
fn get_parent(user: Value) -> BasicBlock { user.get_parent().unwrap() }
|
||||
|
||||
self.as_value().user_iter()
|
||||
.filter(|user| user.is_a_terminator_inst())
|
||||
.filter(is_a_terminator_inst)
|
||||
.map(get_parent)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user