Skip to content

derive-new errors #66525

Closed
Closed
@nikomatsakis

Description

@nikomatsakis

So @wycats pointed out to me that some recent changes in name resolution seem to have broken derive_new. They pointed me at this commit from nushell dealing with the fallout -- @jonathandturner maybe you can leave a few notes as to what errors you were seeing before this commit?

cc @petrochenkov -- could this be the recent changes around name resolution of helper attributes in macros? It seems the relevant code is stuff like:

#[derive(new)]
struct Foo {
    #[new(value = "Arc::new(22)")]
    bar: Arc<i32>
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-langRelevant to the language team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions