Reattach docs to the items they describe

This commit is contained in:
Dennis Kobert
2026-09-06 15:57:05 +00:00
parent fc9e69a7a7
commit 305c36fb25
5 changed files with 12 additions and 13 deletions

View File

@@ -423,10 +423,7 @@ pub(crate) fn flip_carrier(parsed: &ParsedNodeFn) -> bool {
!(async_kernel && lend.is_some())
}
/// Whether a plain node's lowering flips onto record inputs: sync,
/// fully-concrete value-input nodes in this cut; batch, shader, async, lend,
/// lazy, and generic nodes keep the plain lowering until their record forms
/// land.
/// Whether any value input declares `IList` nesting, so the node materializes a ranked input.
pub(crate) fn has_materialized_input(parsed: &ParsedNodeFn) -> bool {
parsed
.fields
@@ -434,6 +431,7 @@ pub(crate) fn has_materialized_input(parsed: &ParsedNodeFn) -> bool {
.any(|field| matches!(&field.ty, ParsedFieldType::Regular(RegularParsedField { list_levels, .. }) if *list_levels > 0))
}
/// Whether a plain node's lowering flips onto record inputs.
pub(crate) fn record_flip(parsed: &ParsedNodeFn) -> bool {
if record_shape(parsed).is_some() || has_record_io(parsed) || routing_io(parsed).is_some() || record_opaque(parsed) {
return false;

View File

@@ -619,10 +619,10 @@ impl Parse for NodeFnAttributes {
let parsed_path: Path = meta.parse_args().map_err(|_| Error::new_spanned(meta, "Expected a valid path for 'batch', e.g., batch(my_batch)"))?;
batch = Some(parsed_path);
}
// Instructs the generated eval to report `Pending` instead of passing partial upstream values into this node.
// Keeps the plain-input lowering for this node during the record transition.
//
// Example usage:
// #[node_macro::node(..., no_partial, ...)]
// #[node_macro::node(..., plain, ...)]
"plain" => {
let path = meta.require_path_only()?;
if plain {
@@ -630,6 +630,10 @@ impl Parse for NodeFnAttributes {
}
plain = true;
}
// Instructs the generated eval to report `Pending` instead of passing partial upstream values into this node.
//
// Example usage:
// #[node_macro::node(..., no_partial, ...)]
"no_partial" => {
let path = meta.require_path_only()?;
if no_partial {