diff --git a/src/parser/new_context.rs b/src/parser/new_context.rs index 5c38ecaa..12888ef0 100644 --- a/src/parser/new_context.rs +++ b/src/parser/new_context.rs @@ -30,17 +30,20 @@ struct Node<'r, T: 'r + ?Sized> { parent: Link<'r, T>, } -struct ContextTree<'r> { +struct ContextTree<'r, T: 'r + ?Sized> { // Not using Link so the ContextTree can own this node - head: Option>>, + head: Option>, } -impl<'r> ContextTree<'r> { +impl<'r> ContextTree<'r, dyn OrgModeContext<'r>> { pub fn new() -> Self { ContextTree { head: None } } - pub fn with_additional_node(&'r self, new_elem: &'r dyn OrgModeContext<'r>) -> ContextTree<'r> { + pub fn with_additional_node( + &'r self, + new_elem: &'r dyn OrgModeContext<'r>, + ) -> ContextTree<'r, dyn OrgModeContext<'r>> { let new_node = Node { elem: new_elem, parent: self.head.as_ref(),