Why does parse_quote for Attribute fail?

The following code:

let get_attribute: syn::Attribute = syn::parse_quote! { "#[getter]" };

fails with error:

message: expected #

Why? And how do I parse this attribute?

Remove the quotes around the attribute.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.