diff --git a/crates/red_knot_python_semantic/src/semantic_index/ast_ids.rs b/crates/red_knot_python_semantic/src/semantic_index/ast_ids.rs index 7ac4c5f3a3505..69771ceb30c5e 100644 --- a/crates/red_knot_python_semantic/src/semantic_index/ast_ids.rs +++ b/crates/red_knot_python_semantic/src/semantic_index/ast_ids.rs @@ -163,11 +163,6 @@ impl AstIdsBuilder { } /// Adds `expr` to the expression ids map and returns its id. - /// - /// ## Safety - /// The function is marked as unsafe because it calls [`AstNodeRef::new`] which requires - /// that `expr` is a child of `parsed`. - #[allow(unsafe_code)] pub(super) fn record_expression(&mut self, expr: &ast::Expr) -> ScopedExpressionId { let expression_id = self.next_expression_id; self.next_expression_id = expression_id + 1; @@ -178,11 +173,6 @@ impl AstIdsBuilder { } /// Adds `expr` to the use ids map and returns its id. - /// - /// ## Safety - /// The function is marked as unsafe because it calls [`AstNodeRef::new`] which requires - /// that `expr` is a child of `parsed`. - #[allow(unsafe_code)] pub(super) fn record_use(&mut self, expr: &ast::Expr) -> ScopedUseId { let use_id = self.next_use_id; self.next_use_id = use_id + 1;