Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/expr_store.rs')
-rw-r--r--crates/hir-def/src/expr_store.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/hir-def/src/expr_store.rs b/crates/hir-def/src/expr_store.rs
index 66f7e25ffa..10cd460d1d 100644
--- a/crates/hir-def/src/expr_store.rs
+++ b/crates/hir-def/src/expr_store.rs
@@ -57,8 +57,7 @@ impl HygieneId {
Self(ctx)
}
- // FIXME: Inline this
- pub(crate) fn lookup(self) -> SyntaxContext {
+ pub(crate) fn syntax_context(self) -> SyntaxContext {
self.0
}
@@ -73,7 +72,8 @@ pub type ExprSource = InFile<ExprPtr>;
pub type PatPtr = AstPtr<ast::Pat>;
pub type PatSource = InFile<PatPtr>;
-pub type LabelPtr = AstPtr<ast::Label>;
+/// BlockExpr -> Desugared label from try block
+pub type LabelPtr = AstPtr<Either<ast::Label, ast::BlockExpr>>;
pub type LabelSource = InFile<LabelPtr>;
pub type FieldPtr = AstPtr<ast::RecordExprField>;
@@ -942,7 +942,7 @@ impl ExpressionStoreSourceMap {
}
pub fn node_label(&self, node: InFile<&ast::Label>) -> Option<LabelId> {
- let src = node.map(AstPtr::new);
+ let src = node.map(AstPtr::new).map(AstPtr::wrap_left);
self.expr_only()?.label_map.get(&src).cloned()
}