Skip to content

Commit f2a3816

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 163253 b: refs/heads/snap-stage3 c: 80a04b1 h: refs/heads/master i: 163251: cc0df05 v: v3
1 parent e1b0457 commit f2a3816

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 9146a919b616e39e528e4d7100d16eef52f1f852
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: e66ba157643420c6a46f07c68e9b817a66a64b4f
4+
refs/heads/snap-stage3: 80a04b1aed74a6f6dc23c3bca6b869b28825f3c6
55
refs/heads/try: 20cbbffeefc1f35e2ea63afce7b42fbd79611d42
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/src/librustc_trans/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#![feature(default_type_params, globs, import_shadowing, macro_rules, phase, quote)]
2626
#![feature(slicing_syntax, unsafe_destructor)]
2727
#![feature(rustc_diagnostic_macros)]
28+
#![feature(unboxed_closures)]
2829

2930
extern crate arena;
3031
extern crate flate;

branches/snap-stage3/src/librustc_trans/trans/_match.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ fn pick_column_to_specialize(def_map: &DefMap, m: &[Match]) -> Option<uint> {
771771
}
772772
};
773773

774-
let column_contains_any_nonwild_patterns: |&uint| -> bool = |&col| {
774+
let column_contains_any_nonwild_patterns = |&: &col: &uint| -> bool {
775775
m.iter().any(|row| match row.pats[col].node {
776776
ast::PatWild(_) => false,
777777
_ => true

branches/snap-stage3/src/librustc_trans/trans/basic_block.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@ pub struct BasicBlock(pub BasicBlockRef);
1717

1818
impl Copy for BasicBlock {}
1919

20-
pub type Preds<'a> = Map<Value, BasicBlock, Filter<'a, Value, Users>, fn(Value) -> BasicBlock>;
20+
pub type Preds = Map<
21+
Value,
22+
BasicBlock,
23+
Filter<Value, Users, fn(&Value) -> bool>,
24+
fn(Value) -> BasicBlock,
25+
>;
2126

2227
/// Wrapper for LLVM BasicBlockRef
2328
impl BasicBlock {
@@ -31,11 +36,12 @@ impl BasicBlock {
3136
}
3237
}
3338

34-
pub fn pred_iter(self) -> Preds<'static> {
39+
pub fn pred_iter(self) -> Preds {
40+
fn is_a_terminator_inst(user: &Value) -> bool { user.is_a_terminator_inst() }
3541
fn get_parent(user: Value) -> BasicBlock { user.get_parent().unwrap() }
3642

3743
self.as_value().user_iter()
38-
.filter(|user| user.is_a_terminator_inst())
44+
.filter(is_a_terminator_inst)
3945
.map(get_parent)
4046
}
4147

0 commit comments

Comments
 (0)