Skip to content

Uninformative error from Attribute::parse_args for some expressions without "full" feature. #1971

@LStan

Description

@LStan

For most expressions that are not included without "full" feature

let attr: Attribute = parse_quote! {
   #[precondition([a])]
};
let precondition: Expr = attr.parse_args().unwrap();

there is an error Error("unsupported expression; enable syn's features=[\"full\"]").

But for Assign expressions #[precondition(value = 5)] there is an uninformative Error("unexpected token").

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions