diff options
| author | Marijn Haverbeke <marijnh@gmail.com> | 2011-10-06 12:26:12 +0200 |
|---|---|---|
| committer | Marijn Haverbeke <marijnh@gmail.com> | 2011-10-07 09:09:50 +0200 |
| commit | f9fbd86f52cf597b85359ade1ca60b8d6ebf7286 (patch) | |
| tree | d6f0cdd039642052f3ccb4ba8f3b9821bb7cbaaf /src/comp/front/attr.rs | |
| parent | 4709038d641ad009b44ed2bf5980fa3a252d6927 (diff) | |
| download | rust-f9fbd86f52cf597b85359ade1ca60b8d6ebf7286.tar.gz rust-f9fbd86f52cf597b85359ade1ca60b8d6ebf7286.zip | |
Parse and typecheck by-value and by-ref arg specs
Add sprinkle && throughout the compiler to make it typecheck again. Issue #1008
Diffstat (limited to 'src/comp/front/attr.rs')
| -rw-r--r-- | src/comp/front/attr.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/comp/front/attr.rs b/src/comp/front/attr.rs index a84c74b94f4..62c6a0282ce 100644 --- a/src/comp/front/attr.rs +++ b/src/comp/front/attr.rs @@ -57,7 +57,7 @@ fn get_attr_name(attr: ast::attribute) -> ast::ident { fn find_meta_items_by_name(metas: [@ast::meta_item], name: ast::ident) -> [@ast::meta_item] { let filter = - bind fn (m: @ast::meta_item, name: ast::ident) -> + bind fn (&&m: @ast::meta_item, name: ast::ident) -> option::t<@ast::meta_item> { if get_meta_item_name(m) == name { option::some(m) @@ -134,7 +134,7 @@ fn contains_name(metas: [@ast::meta_item], name: ast::ident) -> bool { // FIXME: This needs to sort by meta_item variant in addition to the item name fn sort_meta_items(items: [@ast::meta_item]) -> [@ast::meta_item] { - fn lteq(ma: @ast::meta_item, mb: @ast::meta_item) -> bool { + fn lteq(&&ma: @ast::meta_item, &&mb: @ast::meta_item) -> bool { fn key(m: @ast::meta_item) -> ast::ident { alt m.node { ast::meta_word(name) { name } @@ -160,7 +160,7 @@ fn remove_meta_items_by_name(items: [@ast::meta_item], name: str) -> [@ast::meta_item] { let filter = - bind fn (item: @ast::meta_item, name: str) -> + bind fn (&&item: @ast::meta_item, name: str) -> option::t<@ast::meta_item> { if get_meta_item_name(item) != name { option::some(item) |
