mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
fix generated AST
This commit is contained in:
parent
470fc4765c
commit
dcf8e89503
3 changed files with 4 additions and 3 deletions
|
@ -203,7 +203,8 @@ fn api_walkthrough() {
|
|||
assert_eq!(name.text(), "foo");
|
||||
|
||||
// Let's get the `1 + 1` expression!
|
||||
let block: ast::Block = func.body().unwrap();
|
||||
let body: ast::BlockExpr = func.body().unwrap();
|
||||
let block = body.block().unwrap();
|
||||
let expr: ast::Expr = block.expr().unwrap();
|
||||
|
||||
// Enums are used to group related ast nodes together, and can be used for
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue