mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
feat: add use
type bound grammar
This commit is contained in:
parent
eb5da56d83
commit
fa3484f39f
2 changed files with 5 additions and 0 deletions
|
@ -1788,6 +1788,8 @@ pub struct TypeBound {
|
|||
pub(crate) syntax: SyntaxNode,
|
||||
}
|
||||
impl TypeBound {
|
||||
#[inline]
|
||||
pub fn generic_param_list(&self) -> Option<GenericParamList> { support::child(&self.syntax) }
|
||||
#[inline]
|
||||
pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) }
|
||||
#[inline]
|
||||
|
@ -1799,6 +1801,8 @@ impl TypeBound {
|
|||
#[inline]
|
||||
pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
|
||||
#[inline]
|
||||
pub fn use_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![use]) }
|
||||
#[inline]
|
||||
pub fn tilde_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![~]) }
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue