summaryrefslogtreecommitdiff
path: root/macros/src
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-03-17 14:39:30 +0100
committerLaurenz <laurmaedje@gmail.com>2023-03-17 16:04:12 +0100
commitc47e4cb4969836e7fb8955361728105555b6d722 (patch)
tree08b613938b7bc7b82ae358aa8f117af11c1db6a8 /macros/src
parent312197b276748e1a17258ad21837850f582a467c (diff)
State
Diffstat (limited to 'macros/src')
-rw-r--r--macros/src/node.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/macros/src/node.rs b/macros/src/node.rs
index 1d05b9a6..68d43d9c 100644
--- a/macros/src/node.rs
+++ b/macros/src/node.rs
@@ -234,7 +234,7 @@ fn create_new_func(node: &Node) -> TokenStream {
quote! {
/// Create a new node.
pub fn new(#(#params),*) -> Self {
- Self(::typst::model::Content::new::<Self>())
+ Self(::typst::model::Content::new(<Self as ::typst::model::Node>::id()))
#(#builder_calls)*
}
}
@@ -388,7 +388,7 @@ fn create_vtable_func(node: &Node) -> TokenStream {
quote! {
|id| {
- let null = Self(::typst::model::Content::new::<#ident>());
+ let null = Self(::typst::model::Content::new(<#ident as ::typst::model::Node>::id()));
#(#checks)*
None
}
@@ -456,7 +456,7 @@ fn create_construct_impl(node: &Node) -> TokenStream {
vm: &::typst::eval::Vm,
args: &mut ::typst::eval::Args,
) -> ::typst::diag::SourceResult<::typst::model::Content> {
- let mut node = Self(::typst::model::Content::new::<Self>());
+ let mut node = Self(::typst::model::Content::new(<Self as ::typst::model::Node>::id()));
#(#handlers)*
Ok(node.0)
}