Skip to content

clippy triggers rustc 1.34.0 internal compiler error when checking combine 3.8.1 #3943

Closed
@bdonlan

Description

@bdonlan

When running cargo clippy on a package whose dependency graph includes combine = "3.8.1", rustc fails with an internal compiler error:

$ cargo clippy
    Updating crates.io index
   Compiling byteorder v1.3.1
   Compiling memchr v2.2.0
    Checking void v1.0.2
    Checking ascii v0.9.1
    Checking either v1.5.2
    Checking unreachable v1.0.0
    Checking combine v3.8.1
thread 'rustc' panicked at 'begin <= end (617 <= 296) when slicing `pub)
            $(#[$derive])*
            struct $type_name;
            type PartialState = (());
            $(#[$attr])*
            fn $name [$($type_params)*]($($arg : $arg_type),*)($input_type) -> $output_type
                where [$($where_`[...]', src/libcore/str/mod.rs:2014:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.34.0 (91856ed52 2019-04-10) running on x86_64-unknown-linux-gnu

note: compiler flags: -C debuginfo=2 --crate-type lib

note: some of the compiler flags provided by cargo are hidden

error: Could not compile `combine`.

To learn more, run the command again with --verbose.

This can be reproduced by simply adding a combine = "3.8.1" dependency to a fresh cargo package and running cargo clippy on the result.

clippy version:

$ cargo clippy -V
clippy 0.0.212 (1fac380 2019-02-20)

This bug occurs with rustc 1.34.0 but not with 1.35.0-nightly (96d700f1b 2019-04-10).

Metadata

Metadata

Assignees

Labels

I-ICEIssue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions