{"record":{"id":"2f6ee45877152118","repo":"GraphiteEditor/Graphite","slug":"expected-arrow-after-input-type-in-implemen","errorCode":null,"errorMessage":"Expected `->` arrow after input type in #[implementations(...)] on a field of type `impl Node`.\nThe correct syntax is `InputType -> OutputType`.","messagePattern":"Expected `->` arrow after input type in #\\[implementations\\(\\.\\.\\.\\)\\] on a field of type `impl Node`\\.\nThe correct syntax is `InputType -> OutputType`\\.","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"node-graph/node-macro/src/parsing.rs","lineNumber":365,"sourceCode":"\tpub(crate) ty: Type,\n\tpub(crate) implementations: Punctuated<Type, Comma>,\n\tpub(crate) context_features: Vec<Ident>,\n}\n\nimpl Parse for Implementation {\n\tfn parse(input: ParseStream) -> syn::Result<Self> {\n\t\tlet input_type: Type = input.parse().map_err(|e| {\n\t\t\tError::new(\n\t\t\t\tinput.span(),\n\t\t\t\tformatdoc!(\n\t\t\t\t\t\"Failed to parse input type for #[implementation(...)]. Expected a valid Rust type.\n\t\t\t\t\tError: {}\",\n\t\t\t\t\te,\n\t\t\t\t),\n\t\t\t)\n\t\t})?;\n\t\tlet arrow: RArrow = input.parse().map_err(|_| {\n\t\t\tError::new(\n\t\t\t\tinput.span(),\n\t\t\t\tindoc!(\n\t\t\t\t\t\"Expected `->` arrow after input type in #[implementations(...)] on a field of type `impl Node`.\n\t\t\t\t\tThe correct syntax is `InputType -> OutputType`.\"\n\t\t\t\t),\n\t\t\t)\n\t\t})?;\n\t\tlet output_type: Type = input.parse().map_err(|e| {\n\t\t\tError::new(\n\t\t\t\tinput.span(),\n\t\t\t\tformatdoc!(\n\t\t\t\t\t\"Failed to parse output type for #[implementation(...)]. Expected a valid Rust type after `->`.\n\t\t\t\t\tError: {}\",\n\t\t\t\t\te\n\t\t\t\t),\n\t\t\t)\n\t\t})?;\n","sourceCodeStart":347,"sourceCodeEnd":383,"githubUrl":"https://github.com/GraphiteEditor/Graphite/blob/c507b356453361e31638b8bff8f6d46b6da2961e/node-graph/node-macro/src/parsing.rs#L347-L383","documentation":"After the input type parses, the Implementation parser demands an RArrow token before the output type. This error fires when `->` is missing between the two types — the tokens following a successfully parsed input type are not an arrow.","triggerScenarios":"#[implementations(f64 f64)] (space instead of arrow); #[implementations(String)] (a single bare type with no pair); a comma where the arrow belongs.","commonSituations":"Migrating from an older single-type implementations syntax to the InputType -> OutputType pair grammar; hand-editing attributes and dropping the arrow mid-list.","solutions":["Insert the arrow: #[implementations(f64 -> f64)]","For multiple entries keep the shape `A -> B, C -> D`","Re-check the example embedded in the message: #[implementations(i32 -> f64, String -> Vec<u8>)]"],"exampleFix":"// before\n#[implementations(f64 f64)]\n\n// after\n#[implementations(f64 -> f64)]","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always write both sides of every pair, joined by ->","When migrating old nodes, rewrite bare-type lists as pairs in the same commit","Let rustfmt/rust-analyzer format the attribute so missing arrows are easier to spot"],"tags":["proc-macro","rust","node-graph","compile-time"],"backgroundTag":"proc-macro-syntax-error","analyzedSha":"c507b356453361e31638b8bff8f6d46b6da2961e","analyzedAt":"2026-08-16T21:57:18.596Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}