From 8e4f21aba0691f84df9fa23b20be1216b90ca802 Mon Sep 17 00:00:00 2001 From: WillLillis Date: Sat, 27 Dec 2025 02:51:22 -0500 Subject: [PATCH] fix(rust): address nightly clippy lint --- .../generate/src/prepare_grammar/process_inlines.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/crates/generate/src/prepare_grammar/process_inlines.rs b/crates/generate/src/prepare_grammar/process_inlines.rs index d4b7dc18..460d2359 100644 --- a/crates/generate/src/prepare_grammar/process_inlines.rs +++ b/crates/generate/src/prepare_grammar/process_inlines.rs @@ -70,12 +70,13 @@ impl InlinedProductionMapBuilder { let production_map = production_indices_by_step_id .into_iter() .map(|(step_id, production_indices)| { - let production = step_id.variable_index.map_or_else( - || &productions[step_id.production_index], - |variable_index| { - &grammar.variables[variable_index].productions[step_id.production_index] - }, - ) as *const Production; + let production = + core::ptr::from_ref::(step_id.variable_index.map_or_else( + || &productions[step_id.production_index], + |variable_index| { + &grammar.variables[variable_index].productions[step_id.production_index] + }, + )); ((production, step_id.step_index as u32), production_indices) }) .collect();