zed-industries/zed · error · syn::Error

#[gpui::bench] `input_name` requires `inputs`

Error message

#[gpui::bench] `input_name` requires `inputs`

What it means

Compile-time configuration error in #[gpui::bench]: the input_name option only labels per-input benchmarks, so it is meaningless without the inputs list. The macro rejects the inconsistent attribute combination.

Source

Thrown at crates/gpui_macros/src/bench.rs:114

                                    gpui_platform::current_headless_renderer()
                                })),
                                gpui_platform::current_platform(true).text_system(),
                            ),
                            Some(stringify!(#outer_fn_name)),
                            bencher,
                            report.clone(),
                        );
                        #inner_fn_name(input, &mut cx);
                        cx.teardown();
                    }
                });
            }
            group.finish();
            report.print(Some(stringify!(#outer_fn_name)));
        }
    } else {
        if let Some(input_name) = input_name {
            return error_to_stream(syn::Error::new(
                input_name.span(),
                "#[gpui::bench] `input_name` requires `inputs`",
            ));
        }
        if let Some(group_name) = group_name {
            return error_to_stream(syn::Error::new(
                group_name.span(),
                "#[gpui::bench] `group` requires `inputs`",
            ));
        }
        if sample_size.is_some() {
            return error_to_stream(syn::Error::new(
                proc_macro2::Span::call_site(),
                "#[gpui::bench] `sample_size` requires `inputs`",
            ));
        }
        quote! {
            let report = #report_expr;

View on GitHub (pinned to f4178619ac)

Solutions

  1. Add the inputs = [...] argument to the attribute
  2. Remove the input_name option
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/gpui_macros/src/bench.rs:114 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20). Data as JSON: /api/errors/5b6d27c7f42d7b65. Report an issue: GitHub.