Skip to content

Commit 9c6b74e

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 170727 b: refs/heads/try c: 977e151 h: refs/heads/master i: 170725: fa87b3a 170723: e59f6c5 170719: 9b940d2 v: v3
1 parent faa551e commit 9c6b74e

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
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: 73a25f55ad748b4d3516417c711b99ce446591af
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 5b3cd3900ceda838f5798c30ab96ceb41f962534
5-
refs/heads/try: 8570f0acc7f7002b745968d9df57daa49befcc3b
5+
refs/heads/try: 977e151b9a74af6cdb92b7afb57a4dbacc799841
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/src/librustc_typeck/check/method/probe.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -387,14 +387,18 @@ impl<'a,'tcx> ProbeContext<'a,'tcx> {
387387

388388
// Do a search through a list of bounds, using a callback to actually
389389
// create the candidates.
390-
fn elaborate_bounds(
390+
fn elaborate_bounds<F>(
391391
&mut self,
392392
bounds: &[ty::PolyTraitRef<'tcx>],
393393
num_includes_types: bool,
394-
mk_cand: for<'b> |this: &mut ProbeContext<'b, 'tcx>,
395-
tr: ty::PolyTraitRef<'tcx>,
396-
m: Rc<ty::Method<'tcx>>,
397-
method_num: uint|)
394+
mut mk_cand: F,
395+
) where
396+
F: for<'b> FnMut(
397+
&mut ProbeContext<'b, 'tcx>,
398+
ty::PolyTraitRef<'tcx>,
399+
Rc<ty::Method<'tcx>>,
400+
uint,
401+
),
398402
{
399403
debug!("elaborate_bounds(bounds={})", bounds.repr(self.tcx()));
400404

branches/try/src/librustc_typeck/check/wf.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,9 @@ impl<'ccx, 'tcx> CheckTypeWellFormedVisitor<'ccx, 'tcx> {
8181
}
8282
}
8383

84-
fn with_fcx(&mut self,
85-
item: &ast::Item,
86-
f: for<'fcx> |&mut CheckTypeWellFormedVisitor<'ccx, 'tcx>,
87-
&FnCtxt<'fcx, 'tcx>|) {
84+
fn with_fcx<F>(&mut self, item: &ast::Item, mut f: F) where
85+
F: for<'fcx> FnMut(&mut CheckTypeWellFormedVisitor<'ccx, 'tcx>, &FnCtxt<'fcx, 'tcx>),
86+
{
8887
let ccx = self.ccx;
8988
let item_def_id = local_def(item.id);
9089
let polytype = ty::lookup_item_type(ccx.tcx, item_def_id);
@@ -100,10 +99,8 @@ impl<'ccx, 'tcx> CheckTypeWellFormedVisitor<'ccx, 'tcx> {
10099
}
101100

102101
/// In a type definition, we check that to ensure that the types of the fields are well-formed.
103-
fn check_type_defn(&mut self,
104-
item: &ast::Item,
105-
lookup_fields: for<'fcx> |&FnCtxt<'fcx, 'tcx>|
106-
-> Vec<AdtVariant<'tcx>>)
102+
fn check_type_defn<F>(&mut self, item: &ast::Item, mut lookup_fields: F) where
103+
F: for<'fcx> FnMut(&FnCtxt<'fcx, 'tcx>) -> Vec<AdtVariant<'tcx>>,
107104
{
108105
self.with_fcx(item, |this, fcx| {
109106
let variants = lookup_fields(fcx);

0 commit comments

Comments
 (0)