Skip to content

Commit e2da58d

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 170471 b: refs/heads/try c: 28ea99e h: refs/heads/master i: 170469: 1133602 170467: df4f9e8 170463: 9ffd1dc v: v3
1 parent abcb646 commit e2da58d

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
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: a6f30532081fe2eab4b8f24008d494ff2ced9b7f
5+
refs/heads/try: 28ea99eaa6dc052cd3d934769a5c92d144ae5bb2
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/src/librustc_borrowck/borrowck/fragments.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ enum Fragment {
4444

4545
impl Fragment {
4646
fn loan_path_repr<'tcx>(&self, move_data: &MoveData<'tcx>, tcx: &ty::ctxt<'tcx>) -> String {
47-
let repr = |mpi| move_data.path_loan_path(mpi).repr(tcx);
47+
let repr = |&: mpi| move_data.path_loan_path(mpi).repr(tcx);
4848
match *self {
4949
Just(mpi) => repr(mpi),
5050
AllButOneFrom(mpi) => format!("$(allbutone {})", repr(mpi)),
@@ -54,7 +54,7 @@ impl Fragment {
5454
fn loan_path_user_string<'tcx>(&self,
5555
move_data: &MoveData<'tcx>,
5656
tcx: &ty::ctxt<'tcx>) -> String {
57-
let user_string = |mpi| move_data.path_loan_path(mpi).user_string(tcx);
57+
let user_string = |&: mpi| move_data.path_loan_path(mpi).user_string(tcx);
5858
match *self {
5959
Just(mpi) => user_string(mpi),
6060
AllButOneFrom(mpi) => format!("$(allbutone {})", user_string(mpi)),
@@ -140,9 +140,9 @@ pub fn instrument_move_fragments<'tcx>(this: &MoveData<'tcx>,
140140

141141
if !span_err && !print { return; }
142142

143-
let instrument_all_paths = |kind, vec_rc: &Vec<MovePathIndex>| {
143+
let instrument_all_paths = |&: kind, vec_rc: &Vec<MovePathIndex>| {
144144
for (i, mpi) in vec_rc.iter().enumerate() {
145-
let render = || this.path_loan_path(*mpi).user_string(tcx);
145+
let render = |&:| this.path_loan_path(*mpi).user_string(tcx);
146146
if span_err {
147147
tcx.sess.span_err(sp, format!("{}: `{}`", kind, render())[]);
148148
}
@@ -152,9 +152,9 @@ pub fn instrument_move_fragments<'tcx>(this: &MoveData<'tcx>,
152152
}
153153
};
154154

155-
let instrument_all_fragments = |kind, vec_rc: &Vec<Fragment>| {
155+
let instrument_all_fragments = |&: kind, vec_rc: &Vec<Fragment>| {
156156
for (i, f) in vec_rc.iter().enumerate() {
157-
let render = || f.loan_path_user_string(this, tcx);
157+
let render = |&:| f.loan_path_user_string(this, tcx);
158158
if span_err {
159159
tcx.sess.span_err(sp, format!("{}: `{}`", kind, render())[]);
160160
}
@@ -187,11 +187,11 @@ pub fn fixup_fragment_sets<'tcx>(this: &MoveData<'tcx>, tcx: &ty::ctxt<'tcx>) {
187187
let mut moved = mem::replace(&mut fragments.moved_leaf_paths, vec![]);
188188
let mut assigned = mem::replace(&mut fragments.assigned_leaf_paths, vec![]);
189189

190-
let path_lps = |mpis: &[MovePathIndex]| -> Vec<String> {
190+
let path_lps = |&: mpis: &[MovePathIndex]| -> Vec<String> {
191191
mpis.iter().map(|mpi| this.path_loan_path(*mpi).repr(tcx)).collect()
192192
};
193193

194-
let frag_lps = |fs: &[Fragment]| -> Vec<String> {
194+
let frag_lps = |&: fs: &[Fragment]| -> Vec<String> {
195195
fs.iter().map(|f| f.loan_path_repr(this, tcx)).collect()
196196
};
197197

@@ -344,7 +344,7 @@ fn add_fragment_siblings_for_extension<'tcx>(this: &MoveData<'tcx>,
344344
Rc<LoanPath<'tcx>>)>) {
345345
let parent_ty = parent_lp.to_type();
346346

347-
let add_fragment_sibling_local = |field_name, variant_did| {
347+
let mut add_fragment_sibling_local = |&mut : field_name, variant_did| {
348348
add_fragment_sibling_core(
349349
this, tcx, gathered_fragments, parent_lp.clone(), mc, field_name, origin_lp,
350350
variant_did);

branches/try/src/librustc_borrowck/borrowck/gather_loans/restrictions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl<'a, 'tcx> RestrictionsContext<'a, 'tcx> {
5858
cmt: mc::cmt<'tcx>) -> RestrictionResult<'tcx> {
5959
debug!("restrict(cmt={})", cmt.repr(self.bccx.tcx));
6060

61-
let new_lp = |v: LoanPathKind<'tcx>| Rc::new(LoanPath::new(v, cmt.ty));
61+
let new_lp = |&: v: LoanPathKind<'tcx>| Rc::new(LoanPath::new(v, cmt.ty));
6262

6363
match cmt.cat.clone() {
6464
mc::cat_rvalue(..) => {

branches/try/src/librustc_borrowck/borrowck/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ pub fn opt_loan_path<'tcx>(cmt: &mc::cmt<'tcx>) -> Option<Rc<LoanPath<'tcx>>> {
431431
//! which allows it to share common loan path pieces as it
432432
//! traverses the CMT.
433433
434-
let new_lp = |v: LoanPathKind<'tcx>| Rc::new(LoanPath::new(v, cmt.ty));
434+
let new_lp = |&: v: LoanPathKind<'tcx>| Rc::new(LoanPath::new(v, cmt.ty));
435435

436436
match cmt.cat {
437437
mc::cat_rvalue(..) |

0 commit comments

Comments
 (0)