mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-03 17:10:39 +00:00
Fix body selection in while loops
This commit is contained in:
parent
a2cc1d6b7b
commit
87c4a4104d
4 changed files with 34 additions and 3 deletions
|
@ -1035,7 +1035,6 @@ pub struct WhileExpr {
|
|||
pub(crate) syntax: SyntaxNode,
|
||||
}
|
||||
impl ast::HasAttrs for WhileExpr {}
|
||||
impl ast::HasLoopBody for WhileExpr {}
|
||||
impl WhileExpr {
|
||||
pub fn while_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![while]) }
|
||||
pub fn condition(&self) -> Option<Expr> { support::child(&self.syntax) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue