diff options
| author | Michael Sullivan <sully@msully.net> | 2012-07-12 15:03:33 -0700 |
|---|---|---|
| committer | Michael Sullivan <sully@msully.net> | 2012-07-13 17:03:49 -0700 |
| commit | 985b52be6df504ce6dcef29df61ea20ab9c9323f (patch) | |
| tree | a39c70608818cb99dce14da30f67fa9aff9f0e58 /src/libsyntax/attr.rs | |
| parent | e4de1602226315fcb7ee3b1d7f925b5c361f001d (diff) | |
| download | rust-985b52be6df504ce6dcef29df61ea20ab9c9323f.tar.gz rust-985b52be6df504ce6dcef29df61ea20ab9c9323f.zip | |
Support prefix notation for vstore strings. Closes #2906.
Diffstat (limited to 'src/libsyntax/attr.rs')
| -rw-r--r-- | src/libsyntax/attr.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libsyntax/attr.rs b/src/libsyntax/attr.rs index aac0b1f4d76..114daa900aa 100644 --- a/src/libsyntax/attr.rs +++ b/src/libsyntax/attr.rs @@ -77,7 +77,7 @@ fn mk_sugared_doc_attr(text: str, lo: uint, hi: uint) -> ast::attribute { let lit = spanned(lo, hi, ast::lit_str(@text)); let attr = { style: doc_comment_style(text), - value: spanned(lo, hi, ast::meta_name_value(@"doc", lit)), + value: spanned(lo, hi, ast::meta_name_value(@"doc"/~, lit)), is_sugared_doc: true }; ret spanned(lo, hi, attr); @@ -97,7 +97,7 @@ fn attr_metas(attrs: ~[ast::attribute]) -> ~[@ast::meta_item] { fn desugar_doc_attr(attr: ast::attribute) -> ast::attribute { if attr.node.is_sugared_doc { let comment = get_meta_item_value_str(@attr.node.value).get(); - let meta = mk_name_value_item_str(@"doc", + let meta = mk_name_value_item_str(@"doc"/~, strip_doc_comment_decoration(*comment)); ret mk_attr(meta); } else { @@ -345,13 +345,13 @@ fn foreign_abi(attrs: ~[ast::attribute]) -> either<str, ast::foreign_abi> { option::none { either::right(ast::foreign_abi_cdecl) } - option::some(@"rust-intrinsic") { + option::some(@"rust-intrinsic"/~) { either::right(ast::foreign_abi_rust_intrinsic) } - option::some(@"cdecl") { + option::some(@"cdecl"/~) { either::right(ast::foreign_abi_cdecl) } - option::some(@"stdcall") { + option::some(@"stdcall"/~) { either::right(ast::foreign_abi_stdcall) } option::some(t) { @@ -371,8 +371,8 @@ fn find_inline_attr(attrs: ~[ast::attribute]) -> inline_attr { // FIXME (#2809)---validate the usage of #[inline] and #[inline(always)] do vec::foldl(ia_none, attrs) |ia,attr| { alt attr.node.value.node { - ast::meta_word(@"inline") { ia_hint } - ast::meta_list(@"inline", items) { + ast::meta_word(@"inline"/~) { ia_hint } + ast::meta_list(@"inline"/~, items) { if !vec::is_empty(find_meta_items_by_name(items, "always")) { ia_always } else { |
