From 25f9ca751029264c96aefd95cb545d500de040e2 Mon Sep 17 00:00:00 2001 From: Aria Shrimpton Date: Tue, 30 Jan 2024 01:09:11 +0000 Subject: codegen fix --- src/crates/primrose/src/codegen.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/crates/primrose/src/codegen.rs b/src/crates/primrose/src/codegen.rs index b11bb5f..fac55a6 100644 --- a/src/crates/primrose/src/codegen.rs +++ b/src/crates/primrose/src/codegen.rs @@ -54,13 +54,14 @@ impl ContainerSelector { let Tag::Con(elem_ty, _, _) = tag else { panic!("tag_id was not Tag::Con"); }; - let elem_ty = to_trait_bounds(elem_ty); + let bounds = to_trait_bounds(elem_ty); + let vars = elem_ty.join(", "); codegen_block(&format!( r#" #[allow(non_snake_case)] -fn _{tag_id}<{elem_ty}: PartialEq + Ord + std::hash::Hash>() -> {tag_id}<{elem_ty}> {{ - {selection}::<{elem_ty}>::default() +fn _{tag_id}<{bounds}>() -> {tag_id}<{vars}> {{ + {selection}::<{vars}>::default() }} "# )) -- cgit v1.2.3