mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Node-ify lifetimes
This commit is contained in:
parent
d34611633b
commit
dd496223f5
63 changed files with 420 additions and 274 deletions
|
@ -37,9 +37,8 @@ impl Name {
|
|||
Name(Repr::TupleField(idx))
|
||||
}
|
||||
|
||||
pub fn new_lifetime(lt: &syntax::SyntaxToken) -> Name {
|
||||
assert_eq!(lt.kind(), syntax::SyntaxKind::LIFETIME);
|
||||
Name(Repr::Text(lt.text().clone()))
|
||||
pub fn new_lifetime(lt: &ast::Lifetime) -> Name {
|
||||
Self::new_text(lt.text().clone())
|
||||
}
|
||||
|
||||
/// Shortcut to create inline plain text name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue