diff options
| author | Marijn Haverbeke <marijnh@gmail.com> | 2011-10-10 13:54:03 +0200 |
|---|---|---|
| committer | Marijn Haverbeke <marijnh@gmail.com> | 2011-10-10 16:01:51 +0200 |
| commit | 33167f7decfdc70c9dca6c41f80883f12c13cfbc (patch) | |
| tree | 6a7b610fe6af5bd7e1ff81c54e63a580505f32d2 /src/comp/syntax/ext | |
| parent | b4bae8fea5943a0b95a1a9be13a8155ee45418b7 (diff) | |
| download | rust-33167f7decfdc70c9dca6c41f80883f12c13cfbc.tar.gz rust-33167f7decfdc70c9dca6c41f80883f12c13cfbc.zip | |
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
Diffstat (limited to 'src/comp/syntax/ext')
| -rw-r--r-- | src/comp/syntax/ext/simplext.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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<arb_depth<matchable>>, /* helper for transcribe_exprs: what vars from `b` occur in `e`? */ iter free_vars(b: bindings, e: @expr) -> ident { let idents: hashmap<ident, ()> = 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, ()>) -> 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") } |
