Skip to content

1.38 regression ? proc-macro derive panicked if there is r# in front of the attribute name #64924

Open
@fdubois1

Description

I have a macro and it defines an attribute called "async". When I use it, I add r# in front of it. I have this :

#[cowrpc(r#async)]
struct Handshake {
...
}

Since 1.38.0, it fails with

error: proc-macro derive panicked
 --> src/cow/den_server_iface.rs:3:10
  |
3 | #[derive(CowRpcIface)]
  |          ^^^^^^^^^^^
  |
  = help: message: "r#async" is not a valid ident

error: proc-macro derive panicked

It was building without any error before. What is different with 1.38?

Metadata

Assignees

No one assigned

    Labels

    A-attributesArea: Attributes (`#[…]`, `#![…]`)A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)P-mediumMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions