add impl works with lifetimes

This commit is contained in:
Aleksey Kladov 2018-08-28 23:59:57 +03:00
parent ba02a55330
commit 15f15d92eb
6 changed files with 202 additions and 17 deletions

View file

@ -67,6 +67,12 @@ impl<'a> Attr<'a> {
}
}
impl<'a> Lifetime<'a> {
pub fn text(&self) -> SmolStr {
self.syntax().leaf_text().unwrap()
}
}
impl<'a> Name<'a> {
pub fn text(&self) -> SmolStr {
let ident = self.syntax().first_child()