Skip to content

absolute-paths-not-starting-with-crate gives bad suggestion for string-based attribute path #56625

Open
@Marwes

Description

Running

cargo fix --features "test" --all --edition

(Note that lalrpop/lalrpop#426 forces some manual fixup to make generated files writeable)

on https://github.com/gluon-lang/gluon gives a lot of errors ( cargo fix --features "test" -p gluon_base --edition to only fix the first crate does not help either).

Errors seems to be mainly on the form

warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
  --> base\src\ast.rs:12:5
   |
12 | use metadata::{Comment, Metadata};
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::metadata::{Comment, Metadata}`
   |
   = 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>

Output at https://gist.github.com/Marwes/6fbbd86ba442e8a6158c009d5d560dd0

rustc --version --verbose
rustc 1.32.0-nightly (14997d56a 2018-12-05)
binary: rustc
commit-hash: 14997d56a550f4aa99fe737593cd2758227afc56
commit-date: 2018-12-05
host: x86_64-pc-windows-msvc
release: 1.32.0-nightly
LLVM version: 8.0

Metadata

Assignees

No one assigned

    Labels

    A-edition-2018Area: The 2018 editionA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions