Skip to content

Rust 1.54: forcing query with already existing DepNode #7523

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
arxanas opened this issue Aug 1, 2021 · 2 comments
Closed

Rust 1.54: forcing query with already existing DepNode #7523

arxanas opened this issue Aug 1, 2021 · 2 comments
Labels
I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@arxanas
Copy link

arxanas commented Aug 1, 2021

Hi, I'm seeing the following error on Rust 1.54:

Default host: x86_64-apple-darwin
rustup home:  /Users/wkhan/.rustup

stable-x86_64-apple-darwin (default)
rustc 1.54.0 (a178d0322 2021-07-26)

But not on Rust 1.53:

Default host: x86_64-apple-darwin
rustup home:  /Users/wkhan/.rustup

stable-x86_64-apple-darwin (default)
rustc 1.53.0 (53cb7b09b 2021-06-17)

This is the error:

    Checking git-branchless v0.3.3 (/Users/wkhan/workspace/git-branchless)
warning: this expression borrows a reference (`&git::repo::NonZeroOid`) that is immediately dereferenced by the compiler
  --> src/commands/hide.rs:35:35
   |
35 |         let child_commit = &graph[&child_oid].commit;
   |                                   ^^^^^^^^^^ help: change this to: `child_oid`
   |
note: the lint level is defined here
  --> src/lib.rs:39:9
   |
39 | #![warn(clippy::all, missing_docs)]
   |         ^^^^^^^^^^^
   = note: `#[warn(clippy::needless_borrow)]` implied by `#[warn(clippy::all)]`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

thread 'rustc' panicked at 'forcing query with already existing `DepNode`
- query-key: ParamEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: All }, value: core::graph::Node<'_> }
- dep-node: layout_raw(d664275559c64192-ebf7819fcd97d46d)', /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/compiler/rustc_query_system/src/query/plumbing.rs:640: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-clippy/issues/new

note: Clippy version: clippy 0.1.54 (a178d032 2021-07-26)

query stack during panic:
#0 [analysis] running analysis passes on this crate
end of query stack
warning: 1 warning emitted

error: could not compile `git-branchless`

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

You can reproduce by running Clippy on arxanas/git-branchless@f6ef80e. Here is a Github actions build that fails in the same way: https://github.com/arxanas/git-branchless/actions/runs/1088107349.

The warning above is legitimate, but the error does not go away after fixing it.

arxanas added a commit to arxanas/git-branchless that referenced this issue Aug 1, 2021
Clippy panics for this codebase on 1.54.0. See rust-lang/rust-clippy#7523.
arxanas added a commit to arxanas/git-branchless that referenced this issue Aug 1, 2021
Clippy panics for this codebase on 1.54.0. See rust-lang/rust-clippy#7523.
@giraffate
Copy link
Contributor

It might be duplicate of #7373.

@giraffate giraffate added the I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️ label Aug 2, 2021
@giraffate
Copy link
Contributor

I'm closing this because of #7373 (comment).

Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

2 participants