File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
proc_macro_example_derive/src Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ impl ReflectiveInput {
5858 }
5959}
6060
61- // The implementation is done in order to use syn's `parse_macro_input!` macro in the derive macro.
61+ /// The implementation is done in order to use syn's [ `parse_macro_input`] macro in the derive macro.
6262impl Parse for ReflectiveInput {
6363 fn parse ( input : ParseStream ) -> syn:: Result < Self > {
6464 Ok ( Self ( input. parse ( ) ?) )
@@ -91,15 +91,15 @@ impl ToTokens for ReflectiveInput {
9191
9292 // This syntax is very similar to the traditional declarative macro syntax. The main
9393 // difference is instead of `$` we use `#`. Additionally we can use variables from our
94- // #[proc_macro] function like so: `#variable`.
94+ // ` #[proc_macro]` function like so: `#variable`.
9595 quote ! {
9696 impl #item_name {
9797 pub const fn #fn_name( ) -> & ' static [ & ' static str ] {
9898 // ^------- We can even substitute identifiers.
9999
100100 & [ #( #iter_fields) , * ]
101101 // ^- ********** --- `#(),*` expands similarly to how a declarative macro would
102- // be expanded.
102+ // be expanded with `$(),*` .
103103 }
104104 }
105105 }
You can’t perform that action at this time.
0 commit comments