Skip to content

absolute-paths-not-starting-with-crate warning emitted for macros from 2015 edition crates used in 2018 edition crates #62893

Open
@sdroege

Description

@sdroege

See e.g.

warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
   --> src/lib.rs:156:1
    |
156 | / gst_plugin_define!(
157 | |     ndi,
158 | |     env!("CARGO_PKG_DESCRIPTION"),
159 | |     plugin_init,
...   |
165 | |     env!("BUILD_REL_DATE")
166 | | );
    | |__^
    |
    = note: `-W absolute-paths-not-starting-with-crate` implied by `-W rust-2018-compatibility`
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
    = note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
    = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

The macro in question is declared by a 2015 edition crate and used in a 2018 edition crate.

Right now this is only annoying but if this ever becomes a hard error then using all 2015 crates as dependencies of an 2018 crate will be impossible, which was one of to promises of the editions system.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-edition-2018Area: The 2018 editionA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-bugCategory: This is a bug.T-compilerRelevant to the compiler 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