initial draft of fix for issue #2498:

1. make /// ... and //! ... and /** ... */ and /*! ... */ into sugar for #[doc = ...] attributes.
2. add a script in etc/ to help converting doc-attributes to doc-comments
3. add some functions to core::str to help with (1)
This commit is contained in:
Gareth Daniel Smith 2012-06-30 11:54:54 +01:00
parent d7823de5e2
commit 0b653ab953
14 changed files with 454 additions and 59 deletions

View file

@ -233,7 +233,8 @@ mod test {
ast::meta_name_value(
@"crate_type",
ast_util::respan(ast_util::dummy_sp(),
ast::lit_str(@t))))
ast::lit_str(@t)))),
is_sugared_doc: false
})
}

View file

@ -612,7 +612,8 @@ fn get_attributes(md: ebml::doc) -> [ast::attribute]/~ {
assert (vec::len(meta_items) == 1u);
let meta_item = meta_items[0];
vec::push(attrs,
{node: {style: ast::attr_outer, value: *meta_item},
{node: {style: ast::attr_outer, value: *meta_item,
is_sugared_doc: false},
span: ast_util::dummy_sp()});
};
}