Follow-up from Copilot's review on #12.
The extract_mqtt_*_bindings functions in asyncapi-rust-codegen/src/asyncapi_spec_attrs.rs construct syn::Errors for missing required fields (e.g. last_will sub-fields), but the result of nested.parse_nested_meta(...) is assigned to _ and discarded. Invalid bindings are therefore skipped silently rather than surfaced to the user.
Proposed fix: return syn::Result from the extractors and emit err.to_compile_error() from the macro expansion so malformed mqtt(...) attributes fail fast with a clear diagnostic.
Deferred out of #12 to keep that PR scoped to the feature; the discarded-error pattern predates it.
Follow-up from Copilot's review on #12.
The
extract_mqtt_*_bindingsfunctions inasyncapi-rust-codegen/src/asyncapi_spec_attrs.rsconstructsyn::Errors for missing required fields (e.g.last_willsub-fields), but the result ofnested.parse_nested_meta(...)is assigned to_and discarded. Invalid bindings are therefore skipped silently rather than surfaced to the user.Proposed fix: return
syn::Resultfrom the extractors and emiterr.to_compile_error()from the macro expansion so malformedmqtt(...)attributes fail fast with a clear diagnostic.Deferred out of #12 to keep that PR scoped to the feature; the discarded-error pattern predates it.