-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
Hi,
We run cargo clippy --all --all-features -- -D warnings
using Github actions for our project and it started failing with a compiler panic. I have the same issues if I run this on my Mac mini M1. If I just run cargo clippy --all --all-features
it works, and I get no warnings.
This seems to have been triggered by this commit:
NLnetLabs/rpki-rs@67c6b99
Output of the error from my machine:
thread 'rustc' panicked at 'forcing query with already existing `DepNode`
- query-key: ParamEnvAnd { param_env: ParamEnv { caller_bounds: [Binder(TraitPredicate(<R as std::io::BufRead>, polarity:Positive), []), Binder(TraitPredicate(<R as std::io::Read>, polarity:Positive), []), Binder(TraitPredicate(<R as std::marker::Sized>, polarity:Positive), [])], reveal: UserFacing }, value: Const { ty: xml::decode::Name, val: Value(ByRef { alloc: Allocation { bytes: [0, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0], relocations: Relocations(SortedMap { data: [(Size { raw: 0 }, alloc194), (Size { raw: 16 }, alloc153)] }), init_mask: InitMask { blocks: [4294967295], len: Size { raw: 32 } }, align: Align { pow2: 3 }, mutability: Not, extra: () }, offset: Size { raw: 0 } }) } }
- dep-node: destructure_const(dbbd680d64dbbc1d-1e554034797ecc7c)', /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/compiler/rustc_query_system/src/dep_graph/graph.rs:236:9
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-clippy/issues/new
note: Clippy version: clippy 0.1.58 (db9d1b20 2022-01-20)
query stack during panic:
#0 [destructure_const] destructure constant
#1 [check_match] match-checking `remote::publication::<impl at src/remote/publication.rs:552:1: 717:2>::decode::{closure#0}`
end of query stack
error: could not compile `rpki`
Activity
timbru commentedon Jan 27, 2022
Update:
It also happened during a verbose build:
cargo build --all-features --verbose
.I managed to work around the issue in this commit:
NLnetLabs/rpki-rs@021bbb3
It is somehow related to a match that I am doing using
const
values, when I changed this match here to use aconst &[u8]
instead of our own type things worked again:https://github.com/NLnetLabs/rpki-rs/blob/021bbb3cb9db07332d7438883f30238f39ea37b6/src/remote/publication.rs#L607
Somehow it was still okay with other such occurrences.
In any case.. I have refactored my code and this is not in my way anymore. Leaving this here as it seems to point to some issue.
giraffate commentedon Jan 28, 2022
Thanks for the report!
It's a duplicate of rust-lang/rust#89690, so I'm closing this.
deepu105 commentedon Aug 26, 2023
Seeing this again when running clippy in Rust 1.73, don't have it in 1.72
rust-lang/rust#83085 (comment)