diff --git a/src/ast.rs b/src/ast.rs index 4f37e626e..b5f3dc486 100644 --- a/src/ast.rs +++ b/src/ast.rs @@ -333,9 +333,6 @@ fn as_job_list(&self) -> Option<&JobList> { #[allow(unused)] trait ConcreteNodeMut { // Cast to any sub-trait. - fn as_mut_leaf(&mut self) -> Option<&mut dyn Leaf> { - None - } fn as_mut_keyword(&mut self) -> Option<&mut dyn Keyword> { None } @@ -551,9 +548,6 @@ fn as_keyword(&self) -> Option<&dyn Keyword> { } } impl ConcreteNodeMut for $name { - fn as_mut_leaf(&mut self) -> Option<&mut dyn Leaf> { - Some(self) - } fn as_mut_keyword(&mut self) -> Option<&mut dyn Keyword> { Some(self) } @@ -591,9 +585,6 @@ fn as_token(&self) -> Option<&dyn Token> { } } impl ConcreteNodeMut for $name { - fn as_mut_leaf(&mut self) -> Option<&mut dyn Leaf> { - Some(self) - } fn as_mut_token(&mut self) -> Option<&mut dyn Token> { Some(self) } @@ -1801,9 +1792,6 @@ fn as_maybe_newlines(&self) -> Option<&MaybeNewlines> { } } impl ConcreteNodeMut for MaybeNewlines { - fn as_mut_leaf(&mut self) -> Option<&mut dyn Leaf> { - Some(self) - } fn as_mut_maybe_newlines(&mut self) -> Option<&mut MaybeNewlines> { Some(self) } @@ -1826,9 +1814,6 @@ fn as_argument(&self) -> Option<&Argument> { } } impl ConcreteNodeMut for Argument { - fn as_mut_leaf(&mut self) -> Option<&mut dyn Leaf> { - Some(self) - } fn as_mut_argument(&mut self) -> Option<&mut Argument> { Some(self) }