Skip to content
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

Clippy crashes on packed_struct repository #2359

Closed
samueltardieu opened this issue Jan 15, 2018 · 2 comments
Closed

Clippy crashes on packed_struct repository #2359

samueltardieu opened this issue Jan 15, 2018 · 2 comments
Labels
C-bug Category: Clippy is not doing the correct thing

Comments

@samueltardieu
Copy link
Contributor

Clippy 0.0.180 crashes on one of my students program which uses the packed_struct crate. And indeed, the packed_struct crate tests fail as well:

% git clone https://github.com/hashmismatch/packed_struct.rs
% cd packed_struct.rs/packed_struct_tests
% cargo clippy
[…]
thread 'rustc' panicked at 'begin <= end (33 <= 21) when slicing `            #[derive(PackedStruct, Debug, Default, Copy, Clone, PartialEq)]`', libcore/str/mod.rs:2225:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
thread 'main' panicked at 'rustc_thread failed: Any', libcore/result.rs:916:5
error: Could not compile `packed_struct_tests`.

Caused by:
  process didn't exit successfully: `/home/sam/.cargo/bin/clippy-driver rustc --crate-name test_wide_ints_50 packed_struct_tests/tests/test_wide_ints_50.rs --emit=dep-info,link -C debuginfo=2 --emit=metadata --cfg feature="cargo-clippy" --test -C metadata=26861742748633b5 -C extra-filename=-26861742748633b5 --out-dir /tmp/packed_struct.rs/target/debug/deps -C incremental=/tmp/packed_struct.rs/target/debug/incremental -L dependency=/tmp/packed_struct.rs/target/debug/deps --extern packed_struct_codegen=/tmp/packed_struct.rs/target/debug/deps/libpacked_struct_codegen-0dac8e82a280152a.so --extern packed_struct=/tmp/packed_struct.rs/target/debug/deps/libpacked_struct-556ed093310ccdea.rlib` (exit code: 101)

Running cargo build or cargo test in this directory terminates succesfully.

@samueltardieu samueltardieu changed the title Clippy crashes on packet_struct repository Clippy crashes on packed_struct repository Jan 15, 2018
@llogiq
Copy link
Contributor

llogiq commented Feb 1, 2018

This appears to be a problem with workspace handling. cargo clippy --all works, btw.

The error appears to stem from https://github.com/rust-lang-nursery/rust-clippy/blob/master/src/main.rs#L124

@phansch
Copy link
Member

phansch commented Mar 30, 2018

Looks like this is fixed with 0.0.191 (possibly in #2585). I can't reproduce this anymore, so I'm going ahead and close this.

@samueltardieu Feel free to re-open if you still get this crash with 0.0.191.

@phansch phansch closed this as completed Mar 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing
Projects
None yet
Development

No branches or pull requests

4 participants