[X] I have read all the tree-sitter docs if it relates to using the parser
[X] I have searched the existing issues of tree-sitter-rust
Tree-Sitter CLI Version, if relevant (output of tree-sitter --version)
No response
Describe the bug
The where keyword is not highlighted properly in this minimal example:
pub trait MyTrait<'a> {
type Output where Self: 'a;
fn function(&'a mut self) -> Self::Output;
}
Checking with tree-sitter parse shows an error node. However, running cargo check on an otherwise empty project shows no errors, building also works fine. Meaning that the grammar defined in tree-sitter-rust is wrong.
Did you check existing issues?
Tree-Sitter CLI Version, if relevant (output of
tree-sitter --version
)No response
Describe the bug
The where keyword is not highlighted properly in this minimal example:
Checking with
tree-sitter parse
shows an error node. However, running cargo check on an otherwise empty project shows no errors, building also works fine. Meaning that the grammar defined in tree-sitter-rust is wrong.Here is the parsed tree with the error node:
Steps To Reproduce/Bad Parse Tree
tree-sitter generate
example/broken.rs
:tree-sitter parse example/broken.rs
Expected Behavior/Parse Tree
A complete, error-free, tree.
Repro