Skip to content

Commit

Permalink
remove unnecessary allow-unsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
carljm committed Jul 12, 2024
1 parent 23e0203 commit 78d961e
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions crates/red_knot_python_semantic/src/semantic_index/ast_ids.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 78d961e

Please sign in to comment.