diff options
author | Aria Shrimpton <me@aria.rip> | 2024-01-30 01:09:11 +0000 |
---|---|---|
committer | Aria Shrimpton <me@aria.rip> | 2024-01-30 01:09:11 +0000 |
commit | 25f9ca751029264c96aefd95cb545d500de040e2 (patch) | |
tree | e1c2d1d44acb65617fad7b705f515ebe92bccb72 /src/crates | |
parent | 3a914d9541c061d98eb5e6510607975e41f2bc1b (diff) |
codegen fix
Diffstat (limited to 'src/crates')
-rw-r--r-- | src/crates/primrose/src/codegen.rs | 7 |
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() }} "# )) |