mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 05:45:12 +00:00
syntax update: the default value of ConstParam
turned from Expr
into ConstArg
This commit is contained in:
parent
52b4392724
commit
4ebdc6f052
14 changed files with 48 additions and 37 deletions
|
@ -810,7 +810,7 @@ impl FunctionBody {
|
|||
(true, konst.body(), Some(sema.to_def(&konst)?.ty(sema.db)))
|
||||
},
|
||||
ast::ConstParam(cp) => {
|
||||
(true, cp.default_val(), Some(sema.to_def(&cp)?.ty(sema.db)))
|
||||
(true, cp.default_val()?.expr(), Some(sema.to_def(&cp)?.ty(sema.db)))
|
||||
},
|
||||
ast::ConstBlockPat(cbp) => {
|
||||
let expr = cbp.block_expr().map(ast::Expr::BlockExpr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue