mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +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
|
@ -160,9 +160,10 @@ impl<'a> PathTransform<'a> {
|
|||
}
|
||||
(Either::Left(k), None) => {
|
||||
if let Some(default) = k.default(db) {
|
||||
let default = ast::make::expr_const_value(&default);
|
||||
const_substs.insert(k, default.syntax().clone_for_update());
|
||||
// FIXME: transform the default value
|
||||
if let Some(default) = ast::make::expr_const_value(&default).expr() {
|
||||
const_substs.insert(k, default.syntax().clone_for_update());
|
||||
// FIXME: transform the default value
|
||||
}
|
||||
}
|
||||
}
|
||||
_ => (), // ignore mismatching params
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue