aboutsummaryrefslogtreecommitdiff
path: root/src/crates
diff options
context:
space:
mode:
Diffstat (limited to 'src/crates')
-rw-r--r--src/crates/primrose/src/codegen.rs7
1 files 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()
}}
"#
))