| commit | 890083d64fc0ee2ccf298be549827e9c0a975628 | [log] [tgz] |
|---|---|---|
| author | Bryan Henry <bryanhenry@google.com> | Sun Sep 13 10:34:31 2020 -0700 |
| committer | Bryan Henry <bryanhenry@google.com> | Fri Oct 02 11:36:33 2020 -0700 |
| tree | 7dc0fa87ba8f4bdab2820e9157ba3577360ed48b | |
| parent | f2fbac79ab6d2880929a3cdc8e021e53b01ee7e1 [diff] [blame] |
Preserve docs on aliases
diff --git a/macro/src/expand.rs b/macro/src/expand.rs index 955ad5f..c35044b 100644 --- a/macro/src/expand.rs +++ b/macro/src/expand.rs
@@ -657,9 +657,11 @@ } fn expand_type_alias(alias: &TypeAlias) -> TokenStream { + let doc = &alias.doc; let ident = &alias.ident; let ty = &alias.ty; quote! { + #doc pub type #ident = #ty; } }