mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
highlights(rust): distinguish between "for" in loops and impl_item
Fixes #3641
This commit is contained in:
parent
9c3a1366bc
commit
53742779e3
2 changed files with 19 additions and 2 deletions
15
tests/query/highlights/rust/for.rs
Normal file
15
tests/query/highlights/rust/for.rs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
struct Foo;
|
||||
|
||||
// Issue https://github.com/nvim-treesitter/nvim-treesitter/issues/3641
|
||||
// Distinguish between for in loop or impl_item
|
||||
impl Drop for Foo {
|
||||
// ^ @keyword
|
||||
fn drop(&mut self) {}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
for i in 0..128 {
|
||||
// <- @repeat
|
||||
println!("{i}");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue