rust-lang / rust-lang/rust-clippy

Bug "Failed to extract DefId"

Open
#9,411 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

I-ICE
Dominant language
Rust
Stars
13.5k
Forks
2.2k
Avg merge
2d 10h
Merged PRs (30d)
32

Description

Hey,
I got across this compiler error that asked me to post this bug - please let me know what other information you may need

thread 'rustc' panicked at 'Failed to extract DefId: local_def_id_to_hir_id a336cde79f85c510-9d1e316af452ad81', compiler/rustc_middle/src/dep_graph/dep_node.rs:276:17
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.65 (9243168 2022-08-31)

query stack during panic:
#0 [type_op_prove_predicate] evaluating `type_op_prove_predicate` `Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }], value: ParamEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst }, value: ProvePredicate { predicate: Binder(TraitPredicate(<diesel::query_builder::update_statement::UpdateStatement<schema::script::table, diesel::query_builder::where_clause::WhereClause<diesel::expression::operators::Eq<schema::script::columns::id, diesel::expression::bound::Bound<diesel::sql_types::Integer, &i32>>>, (diesel::query_builder::update_statement::changeset::Assign<schema::script::columns::name, diesel::expression::bound::Bound<diesel::sql_types::Text, &alloc::string::String>>, core::option::Option<diesel::query_builder::update_statement::changeset::Assign<schema::script::columns::description, diesel::expression::bound::Bound<diesel::sql_types::Nullable<diesel::sql_types::Text>, &alloc::string::String>>>, diesel::query_builder::update_statement::changeset::Assign<schema::script::columns::is_active, diesel::expression::bound::Bound<diesel::sql_types::Bool, &bool>>, core::option::Option<diesel::query_builder::update_statement::changeset::Assign<schema::script::columns::owner_id, diesel::expression::bound::Bound<diesel::sql_types::Nullable<diesel::sql_types::Integer>, &i32>>>)> as diesel::query_builder::AsQuery>, polarity:Positive), []) } } }`
#1 [mir_borrowck] borrow-checking `adapters::script::<impl at sbox_pg/src/adapters/script.rs:12:1: 12:42>::update::{closure#0}`
end of query stack

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with sbox_pg/src/adapters/script.rs:12 and the reported mir_borrowck query stack, then reduce the Diesel update statement to a minimal reproducer. Done means a reproducible case or a confirmed compiler/Clippy diagnosis with an appropriate regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.