Skip to content

Commit 5bcc4b1

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 163811 b: refs/heads/master c: 015c0fc h: refs/heads/master i: 163809: ff9ee03 163807: 86fad8e v: v3
1 parent c0babb3 commit 5bcc4b1

File tree

4 files changed

+16
-11
lines changed

4 files changed

+16
-11
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 521a6e62b14b2e44d58972c9e28772fc9685b6d5
2+
refs/heads/master: 015c0fcee5779c62a6676106ccec00e2c82fefa5
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 8443b09e361b96d1f9b7f45a65ed0d31c0e86e70
55
refs/heads/try: 20cbbffeefc1f35e2ea63afce7b42fbd79611d42

trunk/src/librustc_driver/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;

trunk/src/librustc_driver/pretty.rs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,15 @@ pub fn parse_pretty(sess: &Session, name: &str) -> (PpMode, Option<UserIdentifie
9999

100100
impl PpSourceMode {
101101
/// Constructs a `PrinterSupport` object and passes it to `f`.
102-
fn call_with_pp_support<'tcx, A, B>(&self,
103-
sess: Session,
104-
ast_map: Option<ast_map::Map<'tcx>>,
105-
type_arena: &'tcx TypedArena<ty::TyS<'tcx>>,
106-
id: String,
107-
payload: B,
108-
f: |&PrinterSupport, B| -> A) -> A {
102+
fn call_with_pp_support<'tcx, A, B, F>(&self,
103+
sess: Session,
104+
ast_map: Option<ast_map::Map<'tcx>>,
105+
type_arena: &'tcx TypedArena<ty::TyS<'tcx>>,
106+
id: String,
107+
payload: B,
108+
f: F) -> A where
109+
F: FnOnce(&PrinterSupport, B) -> A,
110+
{
109111
match *self {
110112
PpmNormal | PpmExpanded => {
111113
let annotation = NoAnn { sess: sess, ast_map: ast_map };

trunk/src/librustc_driver/test.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,11 @@ fn errors(msgs: &[&str]) -> (Box<Emitter+Send>, uint) {
9393
(box ExpectErrorEmitter { messages: v } as Box<Emitter+Send>, msgs.len())
9494
}
9595

96-
fn test_env(source_string: &str,
97-
(emitter, expected_err_count): (Box<Emitter+Send>, uint),
98-
body: |Env|) {
96+
fn test_env<F>(source_string: &str,
97+
(emitter, expected_err_count): (Box<Emitter+Send>, uint),
98+
body: F) where
99+
F: FnOnce(Env),
100+
{
99101
let mut options =
100102
config::basic_options();
101103
options.debugging_opts |= config::VERBOSE;

0 commit comments

Comments
 (0)