Skip to content

cargo fix --edition fails on TiKV #6520

Closed
@brson

Description

@brson

Problem

rustfix errored while upgrading TiKV to 2018, this branch: https://github.com/brson/tikv/tree/nightly-upgrade, commit 72bc513.

Output:

      Fixing src/bin/util/signal_handler.rs (1 fix)
warning: failed to automatically apply fixes suggested by rustc to crate `tikv_importer`

after fixes were automatically applied the compiler reported errors within these files:

  * src/bin/util/signal_handler.rs

This likely indicates a bug in either rustc or cargo itself,
and we would appreciate a bug report! You're likely to see
a number of compiler warnings after this message which cargo
attempted to fix but failed. If you could open an issue at
https://github.com/rust-lang/cargo/issues
quoting the full output of this command we'd be very appreciative!

error[E0432]: unresolved import `crate::util::profilingofiling`
  --> src/bin/util/signal_handler.rs:18:9
   |
18 |     use crate::util::profilingofiling;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `profilingofiling` in `util`

error[E0433]: failed to resolve: use of undeclared type or module `profiling`
  --> src/bin/util/signal_handler.rs:42:28
   |
42 |                 SIGUSR2 => profiling::dump_prof(None),
   |                            ^^^^^^^^^ use of undeclared type or module `profiling`

warning: unused import: `crate::util::profilingofiling`
  --> src/bin/util/signal_handler.rs:18:9
   |
18 |     use crate::util::profilingofiling;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: #[warn(unused_imports)] on by default

warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
  --> src/bin/tikv-importer.rs:43:5
   |
43 | use util::setup::*;
   |     ^^^^^^^^^^^^^^ help: use `crate`: `crate::util::setup::*`
   |
   = 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>

warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
  --> src/bin/tikv-importer.rs:44:5
   |
44 | use util::signal_handler;
   |     ^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::util::signal_handler`
   |
   = 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>

error: aborting due to 2 previous errors

Some errors occurred: E0432, E0433.
For more information about an error, try `rustc --explain E0432`.
error: Could not compile `tikv`.
warning: build failed, waiting for other jobs to finish...
warning: failed to automatically apply fixes suggested by rustc to crate `tikv_ctl`

after fixes were automatically applied the compiler reported errors within these files:

  * src/bin/util/signal_handler.rs

This likely indicates a bug in either rustc or cargo itself,
and we would appreciate a bug report! You're likely to see
a number of compiler warnings after this message which cargo
attempted to fix but failed. If you could open an issue at
https://github.com/rust-lang/cargo/issues
quoting the full output of this command we'd be very appreciative!

error: build failed

Steps

Run cargo fix --edition in the linked repo.

Notes

Output of cargo version:

cargo 1.32.0-nightly (5e85ba1 2018-12-02)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions