Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-db/src/path_transform.rs')
| -rw-r--r-- | crates/ide-db/src/path_transform.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/ide-db/src/path_transform.rs b/crates/ide-db/src/path_transform.rs index cb04a0381b..507200ea3b 100644 --- a/crates/ide-db/src/path_transform.rs +++ b/crates/ide-db/src/path_transform.rs @@ -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 |