File tree Expand file tree Collapse file tree
bon-macros/src/builder/builder_gen Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -109,10 +109,7 @@ impl super::BuilderGenCtx {
109109 format_ident ! ( "elidable_lifetime_names" )
110110 } ;
111111
112- // Construct using a span which links to our original implementation.
113- // This ensures rustdoc doesn't just link every method to the macro
114- // callsite.
115- syn:: parse_quote_spanned! { self . start_fn. span=>
112+ let mut start_fn: syn:: ItemFn = syn:: parse_quote! {
116113 #( #docs) *
117114 #[ inline( always) ]
118115 #[ allow(
@@ -143,6 +140,13 @@ impl super::BuilderGenCtx {
143140 __unsafe_private_named: #named_members_field_init,
144141 }
145142 }
146- }
143+ } ;
144+
145+ let span = self . start_fn . span ;
146+
147+ start_fn. sig . fn_token = syn:: Token ![ fn ] ( span) ;
148+ start_fn. block . brace_token = syn:: token:: Brace ( span) ;
149+
150+ start_fn
147151 }
148152}
You can’t perform that action at this time.
0 commit comments