Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir/src/lib.rs')
| -rw-r--r-- | crates/hir/src/lib.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index 2264bbbfd7..ef17f2a75e 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs @@ -2223,6 +2223,7 @@ impl Local { let src = source_map.pat_syntax(self.pat_id).unwrap(); // Hmm... let root = src.file_syntax(db.upcast()); src.map(|ast| match ast { + // Suspicious unwrap Either::Left(it) => Either::Left(it.cast().unwrap().to_node(&root)), Either::Right(it) => Either::Right(it.to_node(&root)), }) |