Skip to content

Issue running cargo fix #5818

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
theotherphil opened this issue Jul 28, 2018 · 1 comment
Closed

Issue running cargo fix #5818

theotherphil opened this issue Jul 28, 2018 · 1 comment

Comments

@theotherphil
Copy link

On the imageproc crate https://github.com/PistonDevelopers/imageproc

Creating an issue because the build log told me to:

$ cargo +nightly fix --prepare-for 2018 --all-targets --all-features --allow-dirty
    Checking nodrop v0.1.12
    Checking cfg-if v0.1.2
    Checking memoffset v0.2.1
   Compiling num-traits v0.2.5
    Checking scopeguard v0.3.3
    Checking lazy_static v0.2.11
    Checking libc v0.2.37
   Compiling rayon-core v1.4.0
    Checking void v1.0.2
   Compiling unicode-xid v0.1.0
   Compiling typenum v1.10.0
    Checking lazy_static v1.0.0
   Compiling num-complex v0.2.0
   Compiling matrixmultiply v0.1.14
    Checking adler32 v1.0.2
    Checking regex-syntax v0.4.2
    Checking rustc-serialize v0.3.24
    Checking utf8-ranges v1.0.0
    Checking byteorder v1.2.1
    Checking either v1.4.0
    Checking bitflags v1.0.1
    Checking color_quant v1.0.0
    Checking rawpointer v0.1.0
    Checking lzw v0.10.0
    Checking rand_core v0.2.1
    Checking custom_derive v0.1.7
    Checking approx v0.1.1
    Checking scoped_threadpool v0.1.9
    Checking crossbeam-utils v0.2.2
    Checking log v0.4.1
    Checking arrayvec v0.4.7
    Checking unreachable v1.0.0
    Checking unreachable v0.1.1
   Compiling proc-macro2 v0.4.9
    Checking inflate v0.4.3
    Checking itertools v0.7.6
    Checking memchr v2.0.1
    Checking num_cpus v1.8.0
    Checking rand v0.4.2
    Checking conv v0.3.3
    Checking deflate v0.7.17
    Checking stb_truetype v0.2.2
    Checking gif v0.10.0
    Checking rand v0.5.4
    Checking thread_local v0.3.5
    Checking log v0.3.9
    Checking aho-corasick v0.6.4
    Checking crossbeam-epoch v0.3.0
   Compiling quote v0.6.4
    Checking regex v0.2.6
    Checking crossbeam-deque v0.2.0
   Compiling syn v0.14.5
    Checking generic-array v0.11.1
    Checking rayon v1.0.0
    Checking num-integer v0.1.36
    Checking approx v0.3.0
    Checking num-traits v0.1.43
    Checking ordered-float v0.5.0
    Checking num-iter v0.1.35
    Checking num-bigint v0.1.43
    Checking num-complex v0.1.42
    Checking png v0.12.0
    Checking rusttype v0.5.2
    Checking env_logger v0.4.3
    Checking quickcheck v0.6.1
    Checking alga v0.7.0
    Checking num-rational v0.1.42
    Checking num v0.1.42
    Checking jpeg-decoder v0.1.14
   Compiling num-derive v0.2.2
    Checking nalgebra v0.16.0
    Checking image v0.19.0
    Checking imageproc v0.15.0 (file:///Users/philip/dev/imageproc)
warning: error applying suggestions to `src/drawing/line.rs`

The full error message was:

> Cannot replace slice of data that was already replacedThis 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!

      Fixing src/hough.rs (3 fixes)
      Fixing src/drawing/polygon.rs (3 fixes)
      Fixing src/map.rs (1 fix)
      Fixing src/morphology.rs (1 fix)
      Fixing src/filter/mod.rs (6 fixes)
      Fixing src/suppress.rs (5 fixes)
      Fixing src/contrast.rs (5 fixes)
      Fixing src/drawing/conics.rs (3 fixes)
      Fixing src/hog.rs (5 fixes)
      Fixing src/drawing/cross.rs (1 fix)
      Fixing src/drawing/text.rs (2 fixes)
      Fixing src/haar.rs (3 fixes)
      Fixing src/filter/median.rs (4 fixes)
      Fixing src/gradients.rs (4 fixes)
      Fixing src/noise.rs (2 fixes)
      Fixing src/drawing/line.rs (8 fixes)
      Fixing src/drawing/bezier.rs (2 fixes)
      Fixing src/affine.rs (3 fixes)
      Fixing src/distance_transform.rs (4 fixes)
      Fixing src/region_labelling.rs (3 fixes)
      Fixing src/pixelops.rs (2 fixes)
      Fixing src/template_matching.rs (4 fixes)
      Fixing src/edges.rs (5 fixes)
      Fixing src/property_testing.rs (1 fix)
      Fixing src/seam_carving.rs (4 fixes)
      Fixing src/integral_image.rs (5 fixes)
      Fixing src/corners.rs (1 fix)
      Fixing src/drawing/rect.rs (4 fixes)
      Fixing src/stats.rs (1 fix)
warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
 --> src/drawing/line.rs:2:5
  |
2 | use definitions::Image;
  |     ^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::definitions::Image`
  |
  = 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 TBD

warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
   --> src/drawing/line.rs:465:13
    |
465 |         use pixelops::interpolate;
    |             ^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::pixelops::interpolate`
    |
    = 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 TBD

warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
   --> src/drawing/line.rs:497:13
    |
497 |         use pixelops::interpolate;
    |             ^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::pixelops::interpolate`
    |
    = 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 TBD

warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
   --> src/drawing/line.rs:524:13
    |
524 |         use pixelops::interpolate;
    |             ^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::pixelops::interpolate`
    |
    = 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 TBD

warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
   --> src/drawing/line.rs:548:21
    |
548 |                   use pixelops::interpolate;
    |                       ^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::pixelops::interpolate`
...
561 | /     bench_antialiased_lines!(
562 | |         bench_draw_antialiased_line_segment_horizontal,
563 | |         (10, 10), (450, 10)
564 | |     );
    | |______- in this macro invocation
    |
    = 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 TBD

warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
   --> src/drawing/line.rs:548:21
    |
548 |                   use pixelops::interpolate;
    |                       ^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::pixelops::interpolate`
...
566 | /     bench_antialiased_lines!(
567 | |         bench_draw_antialiased_line_segment_vertical,
568 | |         (10, 10), (10, 450)
569 | |     );
    | |______- in this macro invocation
    |
    = 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 TBD

warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
   --> src/drawing/line.rs:548:21
    |
548 |                   use pixelops::interpolate;
    |                       ^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::pixelops::interpolate`
...
571 | /     bench_antialiased_lines!(
572 | |         bench_draw_antialiased_line_segment_diagonal,
573 | |         (10, 10), (450, 450)
574 | |     );
    | |______- in this macro invocation
    |
    = 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 TBD

warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
   --> src/drawing/line.rs:548:21
    |
548 |                   use pixelops::interpolate;
    |                       ^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::pixelops::interpolate`
...
576 | /     bench_antialiased_lines!(
577 | |         bench_draw_antialiased_line_segment_shallow,
578 | |         (10, 10), (450, 80)
579 | |     );
    | |______- in this macro invocation
    |
    = 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 TBD

warning: bounds on generic parameters are not enforced in type aliases
  --> src/definitions.rs:16:19
   |
16 | pub type Image<P: Pixel> = ImageBuffer<P, Vec<P::Subpixel>>;
   |                   ^^^^^
   |
   = note: #[warn(type_alias_bounds)] on by default
   = help: the bound will not be checked when the type alias is used, and should be removed
help: use fully disambiguated paths (i.e., `<T as Trait>::Assoc`) to refer to associated types in type aliases
  --> src/definitions.rs:16:47
   |
16 | pub type Image<P: Pixel> = ImageBuffer<P, Vec<P::Subpixel>>;
   |                                               ^^^^^^^^^^^

      Fixing src/drawing/line.rs (1 fix)
warning: bounds on generic parameters are not enforced in type aliases
  --> src/definitions.rs:16:19
   |
16 | pub type Image<P: Pixel> = ImageBuffer<P, Vec<P::Subpixel>>;
   |                   ^^^^^
   |
   = note: #[warn(type_alias_bounds)] on by default
   = help: the bound will not be checked when the type alias is used, and should be removed
help: use fully disambiguated paths (i.e., `<T as Trait>::Assoc`) to refer to associated types in type aliases
  --> src/definitions.rs:16:47
   |
16 | pub type Image<P: Pixel> = ImageBuffer<P, Vec<P::Subpixel>>;
   |                                               ^^^^^^^^^^^

    Finished dev [unoptimized + debuginfo] target(s) in 46.60s
@alexcrichton
Copy link
Member

Thanks so much for the report! Looking at the output here I believe this is a duplicate of #5785 which should be fixed by rust-lang/rust#52720 once it's in nightly.

I'm gonna close this for now, but thanks for filing the bug regardless!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants