mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
correctly infer labelled breaks
This commit is contained in:
parent
fb469c3b31
commit
1cd78a3355
9 changed files with 117 additions and 46 deletions
|
@ -1081,6 +1081,7 @@ pub struct BlockExpr {
|
|||
impl ast::AttrsOwner for BlockExpr {}
|
||||
impl ast::ModuleItemOwner for BlockExpr {}
|
||||
impl BlockExpr {
|
||||
pub fn label(&self) -> Option<Label> { support::child(&self.syntax) }
|
||||
pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
|
||||
pub fn statements(&self) -> AstChildren<Stmt> { support::children(&self.syntax) }
|
||||
pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue