Support bare reference parameters and lending outputs in the node macro and make the clone node the clone-out adapter

This commit is contained in:
Dennis Kobert
2026-08-03 18:29:16 +00:00
parent 9b45af854a
commit 62b7ccf40c
10 changed files with 254 additions and 172 deletions

View File

@@ -923,7 +923,7 @@ fn ref_adapter(proposed: &Type, wanted: &Type) -> Option<ProtoNodeIdentifier> {
return None;
};
match (proposed_output.as_ref(), wanted_output.as_ref()) {
(Type::Ref(inner), wanted_output @ Type::Concrete(_)) if valid_type(inner, wanted_output) => Some(ProtoNodeIdentifier::new("graphene_core::memo::CloneOutNode")),
(Type::Ref(inner), wanted_output @ Type::Concrete(_)) if valid_type(inner, wanted_output) => Some(ProtoNodeIdentifier::new("graphene_core::debug::CloneNode")),
(proposed_output @ Type::Concrete(_), Type::Ref(inner)) if valid_type(proposed_output, inner) => Some(ProtoNodeIdentifier::new("graphene_core::memo::LendNode")),
_ => None,
}