Skip to content

Commit aa116f4

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 164799 b: refs/heads/try c: 015c0fc h: refs/heads/master i: 164797: 697f7b8 164795: 02636ea 164791: 80efd3f 164783: b33103a 164767: 0e956c7 164735: 8b6b89c v: v3
1 parent 4ecb743 commit aa116f4

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
@@ -2,7 +2,7 @@
22
refs/heads/master: f8f2c7a9537c7f333b242f616aefb75a83860927
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 8443b09e361b96d1f9b7f45a65ed0d31c0e86e70
5-
refs/heads/try: 521a6e62b14b2e44d58972c9e28772fc9685b6d5
5+
refs/heads/try: 015c0fcee5779c62a6676106ccec00e2c82fefa5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/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;

branches/try/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 };

branches/try/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)