Skip to content

Commit 5afe6aa

Browse files
committed
Minor tweaks to ReflectiveInput's documentation
1 parent e534ea1 commit 5afe6aa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

proc_macro_example_derive/src/reflective.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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.
6262
impl 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
}

0 commit comments

Comments
 (0)