Skip to content

tracing-subscriber error messages include references to types like __tracing_subscriber_Layer #1847

@lilyball

Description

@lilyball

Bug Report

Version

└── tracing-core v0.1.21
├── tracing v0.1.29
│   ├── tracing-attributes v0.1.18 (proc-macro)
│   └── tracing-core v0.1.21 (*)
└── tracing-subscriber v0.3.6
    ├── tracing-core v0.1.21 (*)
    └── tracing-log v0.1.2
        └── tracing-core v0.1.21 (*)

Platform

Darwin DeerBook 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:54 PST 2021; root:xnu-8019.61.5~1/RELEASE_X86_64 x86_64

Crates

tracing-subscriber

Description

When I get error messages (in this case, the errors from #1846) they can include references to traits like __tracing_subscriber_Layer. This is very confusing. Searching the codebase, it appears this comes from tracing_subscriber::prelude, which imports multiple traits but gives them these opaque names instead of just importing them as _. I don't actually know why the error messages I got used the opaque names, but I suppose the compiler must have just gotten confused about what the best name for the type was when following the chain of types and traits.

In any case, given the lack of any other references to these names, these opaque names in the prelude should probably just be replaced with _ so as to avoid confusing the compiler about what the correct name for the trait is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    meta/breakingThis is a breaking change, and should wait until the next breaking release.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions