rustdoc: remove .borrow()
calls in Askama templates for ItemTemplate
implementors
#112021
Closed
2 tasks
Context:
ItemTemplate
trait and related functions to avoid repetitively wrapping existing functions #111946 (see section: existing discussion on how to solve this issue).borrow()
calls will raise compilation errorsItemTemplate
Would like to hear more ideas to tackle this problem, but this is my proposal (rough idea):
ItemTemplate
for references:impl<T: ItemTemplate> ItemTemplate for &T
derive
macro forItemTemplate
; One might ask, is there a need for macros here?impl<T: ItemTemplate> askama::Template for &T
is required&T
, which can be done by copying the associated types and calling existing methods fromT
(basically making&T
behave the same asT
)I suspect that we can gain more by creating macros here, but it is still under exploration.
cc @GuillaumeGomez
The text was updated successfully, but these errors were encountered: