fix(ts)(rust): add support for impl with type params

This commit is contained in:
Steven Arcangeli 2022-01-11 18:08:14 -08:00
parent 4ab6882728
commit 174e3b7e47
3 changed files with 13 additions and 0 deletions

View file

@ -19,3 +19,8 @@
(impl_item
trait: (type_identifier)? @trait
type: (type_identifier) @rust_type) @type
(impl_item
trait: (type_identifier)? @trait
type: (generic_type
type: (type_identifier) @rust_type)) @type

View file

@ -79,6 +79,13 @@ describe("treesitter rust", function()
},
},
},
{
kind = "Class",
name = "MyStruct > GenericTrait",
level = 1,
lnum = 21,
col = 4,
},
},
},
})

View file

@ -18,4 +18,5 @@ mod mod_1 {
write!(f, "hi");
}
}
impl<T> GenericTrait for MyStruct<T> {}
}