about summary refs log tree commit diff
path: root/src/libsyntax/ast.rs
diff options
context:
space:
mode:
authorGareth Daniel Smith <garethdanielsmith@gmail.com>2012-06-30 11:54:54 +0100
committerGareth Daniel Smith <garethdanielsmith@gmail.com>2012-06-30 11:54:54 +0100
commit0b653ab9539140bb04941de9a36c03cf10bfc28b (patch)
tree491d1b3f128a281ffb3a12240e6858a919f5f3dd /src/libsyntax/ast.rs
parentd7823de5e2bfc749c2fb4fcfe4d65d54b28e3a92 (diff)
downloadrust-0b653ab9539140bb04941de9a36c03cf10bfc28b.tar.gz
rust-0b653ab9539140bb04941de9a36c03cf10bfc28b.zip
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)
Diffstat (limited to 'src/libsyntax/ast.rs')
-rw-r--r--src/libsyntax/ast.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs
index 3d2d28a9b1d..d0876dd1062 100644
--- a/src/libsyntax/ast.rs
+++ b/src/libsyntax/ast.rs
@@ -652,8 +652,9 @@ type attribute = spanned<attribute_>;
 #[auto_serialize]
 enum attr_style { attr_outer, attr_inner, }
 
+// doc-comments are promoted to attributes that have is_sugared_doc = true
 #[auto_serialize]
-type attribute_ = {style: attr_style, value: meta_item};
+type attribute_ = {style: attr_style, value: meta_item, is_sugared_doc: bool};
 
 /*
   iface_refs appear in both impls and in classes that implement ifaces.