Skip to content

Commit a2e79f3

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 170478 b: refs/heads/try c: ab402c0 h: refs/heads/master v: v3
1 parent 8eb53a8 commit a2e79f3

File tree

9 files changed

+16
-16
lines changed

9 files changed

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

branches/try/src/libsyntax/ext/deriving/default.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ fn default_substructure(cx: &mut ExtCtxt, trait_span: Span, substr: &Substructur
5555
cx.ident_of("Default"),
5656
cx.ident_of("default")
5757
);
58-
let default_call = |span| cx.expr_call_global(span, default_ident.clone(), Vec::new());
58+
let default_call = |&: span| cx.expr_call_global(span, default_ident.clone(), Vec::new());
5959

6060
return match *substr.fields {
6161
StaticStruct(_, ref summary) => {

branches/try/src/libsyntax/ext/deriving/generic/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,7 @@ impl<'a> MethodDef<'a> {
935935
// where each tuple has length = self_args.len()
936936
let mut match_arms: Vec<ast::Arm> = variants.iter().enumerate()
937937
.map(|(index, variant)| {
938-
let mk_self_pat = |cx: &mut ExtCtxt, self_arg_name: &str| {
938+
let mk_self_pat = |&: cx: &mut ExtCtxt, self_arg_name: &str| {
939939
let (p, idents) = trait_.create_enum_variant_pattern(cx, type_ident,
940940
&**variant,
941941
self_arg_name,

branches/try/src/libsyntax/ext/deriving/hash.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ fn hash_substructure(cx: &mut ExtCtxt, trait_span: Span, substr: &Substructure)
7171
_ => cx.span_bug(trait_span, "incorrect number of arguments in `deriving(Hash)`")
7272
};
7373
let hash_ident = substr.method_ident;
74-
let call_hash = |span, thing_expr| {
74+
let call_hash = |&: span, thing_expr| {
7575
let expr = cx.expr_method_call(span, thing_expr, hash_ident, vec!(state_expr.clone()));
7676
cx.stmt_expr(expr)
7777
};

branches/try/src/libsyntax/ext/deriving/zero.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ fn zero_substructure(cx: &mut ExtCtxt, trait_span: Span, substr: &Substructure)
7171
cx.ident_of("Zero"),
7272
cx.ident_of("zero")
7373
);
74-
let zero_call = |span| cx.expr_call_global(span, zero_ident.clone(), Vec::new());
74+
let zero_call = |&: span| cx.expr_call_global(span, zero_ident.clone(), Vec::new());
7575

7676
return match *substr.fields {
7777
StaticStruct(_, ref summary) => {

branches/try/src/libsyntax/ext/expand.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1660,7 +1660,7 @@ mod test {
16601660
assert!((shouldmatch.len() == 0) ||
16611661
(varrefs.len() > *shouldmatch.iter().max().unwrap()));
16621662
for (idx,varref) in varrefs.iter().enumerate() {
1663-
let print_hygiene_debug_info = || {
1663+
let print_hygiene_debug_info = |&:| {
16641664
// good lord, you can't make a path with 0 segments, can you?
16651665
let final_varref_ident = match varref.segments.last() {
16661666
Some(pathsegment) => pathsegment.identifier,

branches/try/src/libsyntax/ext/quote.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -800,11 +800,11 @@ fn expand_parse_call(cx: &ExtCtxt,
800800
tts: &[ast::TokenTree]) -> P<ast::Expr> {
801801
let (cx_expr, tts_expr) = expand_tts(cx, sp, tts);
802802

803-
let cfg_call = || cx.expr_method_call(
803+
let cfg_call = |&:| cx.expr_method_call(
804804
sp, cx.expr_ident(sp, id_ext("ext_cx")),
805805
id_ext("cfg"), Vec::new());
806806

807-
let parse_sess_call = || cx.expr_method_call(
807+
let parse_sess_call = |&:| cx.expr_method_call(
808808
sp, cx.expr_ident(sp, id_ext("ext_cx")),
809809
id_ext("parse_sess"), Vec::new());
810810

branches/try/src/libsyntax/parse/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ pub fn new_parser_from_tts<'a>(sess: &'a ParseSess,
240240
/// add the path to the session's codemap and return the new filemap.
241241
pub fn file_to_filemap(sess: &ParseSess, path: &Path, spanopt: Option<Span>)
242242
-> Rc<FileMap> {
243-
let err = |msg: &str| {
243+
let err = |&: msg: &str| {
244244
match spanopt {
245245
Some(sp) => sess.span_diagnostic.span_fatal(sp, msg),
246246
None => sess.span_diagnostic.handler().fatal(msg),
@@ -399,7 +399,7 @@ pub fn char_lit(lit: &str) -> (char, int) {
399399
.map(|x| (x, len as int))
400400
}
401401

402-
let unicode_escape: || -> Option<(char, int)> = ||
402+
let unicode_escape = |&: | -> Option<(char, int)>
403403
if lit.as_bytes()[2] == b'{' {
404404
let idx = lit.find('}').expect(msg2);
405405
let subslice = lit[3..idx];
@@ -426,7 +426,7 @@ pub fn str_lit(lit: &str) -> String {
426426
let mut res = String::with_capacity(lit.len());
427427

428428
// FIXME #8372: This could be a for-loop if it didn't borrow the iterator
429-
let error = |i| format!("lexer should have rejected {} at {}", lit, i);
429+
let error = |&: i| format!("lexer should have rejected {} at {}", lit, i);
430430

431431
/// Eat everything up to a non-whitespace
432432
fn eat<'a>(it: &mut iter::Peekable<(uint, char), str::CharIndices<'a>>) {
@@ -561,7 +561,7 @@ pub fn float_lit(s: &str, suffix: Option<&str>, sd: &SpanHandler, sp: Span) -> a
561561

562562
/// Parse a string representing a byte literal into its final form. Similar to `char_lit`
563563
pub fn byte_lit(lit: &str) -> (u8, uint) {
564-
let err = |i| format!("lexer accepted invalid byte literal {} step {}", lit, i);
564+
let err = |&: i| format!("lexer accepted invalid byte literal {} step {}", lit, i);
565565

566566
if lit.len() == 1 {
567567
(lit.as_bytes()[0], 1)
@@ -595,7 +595,7 @@ pub fn binary_lit(lit: &str) -> Rc<Vec<u8>> {
595595
let mut res = Vec::with_capacity(lit.len());
596596

597597
// FIXME #8372: This could be a for-loop if it didn't borrow the iterator
598-
let error = |i| format!("lexer should have rejected {} at {}", lit, i);
598+
let error = |&: i| format!("lexer should have rejected {} at {}", lit, i);
599599

600600
/// Eat everything up to a non-whitespace
601601
fn eat<'a, I: Iterator<(uint, u8)>>(it: &mut iter::Peekable<(uint, u8), I>) {

branches/try/src/libsyntax/test.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -545,11 +545,11 @@ fn mk_test_desc_and_fn_rec(cx: &TestCtxt, test: &Test) -> P<ast::Expr> {
545545
let test_id = ecx.ident_of("test");
546546

547547
// creates self::test::$name
548-
let test_path = |name| {
548+
let test_path = |&: name| {
549549
ecx.path(span, vec![self_id, test_id, ecx.ident_of(name)])
550550
};
551551
// creates $name: $expr
552-
let field = |name, expr| ecx.field_imm(span, ecx.ident_of(name), expr);
552+
let field = |&: name, expr| ecx.field_imm(span, ecx.ident_of(name), expr);
553553

554554
debug!("encoding {}", ast_util::path_name_i(path[]));
555555

@@ -563,7 +563,7 @@ fn mk_test_desc_and_fn_rec(cx: &TestCtxt, test: &Test) -> P<ast::Expr> {
563563
vec![name_expr]);
564564

565565
let ignore_expr = ecx.expr_bool(span, test.ignore);
566-
let should_fail_path = |name| {
566+
let should_fail_path = |&: name| {
567567
ecx.path(span, vec![self_id, test_id, ecx.ident_of("ShouldFail"), ecx.ident_of(name)])
568568
};
569569
let fail_expr = match test.should_fail {

0 commit comments

Comments
 (0)