Skip to content

instrument macro can make functions not compile as of 0.1.29 #3306

Closed
@jplatte

Description

@jplatte

Bug Report

Given this minimized example:

type Foo = ();
enum Bar {
    Foo,
}

fn this_is_fine() -> Foo {
    // glob import imports Bar::Foo, shadowing Foo
    use Bar::*;
}

adding #[tracing::instrument] to this_is_fine makes it no longer compile.

This used to work before #3108 (i.e. in tracing-attributes 0.1.28), and stopped working afterwards. rust-analyzer's expand macro assist produces identical output for both (there's a chance I failed to properly rebuild proc-macros in between, but I tried at least), so I'm pretty sure that this is a macro hygiene issue (just like the issue[s] fixed by #3108).

Any ideas what we could do @hds @9999years?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions