From 33167f7decfdc70c9dca6c41f80883f12c13cfbc Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Mon, 10 Oct 2011 13:54:03 +0200 Subject: Adjust function signatures to allow for vecs being immediate Some code was relying on vectors being implicitly by-reference (as non-immediate value). This adds the necessary &&-sigils. Closes #1021 --- src/comp/syntax/ext/simplext.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/comp/syntax/ext') diff --git a/src/comp/syntax/ext/simplext.rs b/src/comp/syntax/ext/simplext.rs index 966d1f95c00..656ee3663af 100644 --- a/src/comp/syntax/ext/simplext.rs +++ b/src/comp/syntax/ext/simplext.rs @@ -245,7 +245,7 @@ fn follow_for_trans(cx: ext_ctxt, mmaybe: option::t>, /* helper for transcribe_exprs: what vars from `b` occur in `e`? */ iter free_vars(b: bindings, e: @expr) -> ident { let idents: hashmap = new_str_hash::<()>(); - fn mark_ident(i: ident, _fld: ast_fold, b: bindings, + fn mark_ident(&&i: ident, _fld: ast_fold, b: bindings, idents: hashmap) -> ident { if b.contains_key(i) { idents.insert(i, ()); } ret i; @@ -325,7 +325,7 @@ fn transcribe_exprs(cx: ext_ctxt, b: bindings, idx_path: @mutable [uint], // substitute, in a position that's required to be an ident fn transcribe_ident(cx: ext_ctxt, b: bindings, idx_path: @mutable [uint], - i: ident, _fld: ast_fold) -> ident { + &&i: ident, _fld: ast_fold) -> ident { ret alt follow_for_trans(cx, b.find(i), idx_path) { some(match_ident(a_id)) { a_id.node } some(m) { match_error(cx, m, "an identifier") } -- cgit 1.4.1-3-g733a5