Skip to content

ICE: 'compiler/rustc_resolve/src/lib.rs:1929:21: undetermined resolution during main resolution pass',  #82865

@chengniansun

Description

@chengniansun

Code

use rustc_expand::base::SyntaxExtension;
fn register_builtin_macros() {
    macro register_derive ($($f : expr,)) { $ (Box :: SyntaxExtension($f)) }
    register_derive! { clone, }
}

Meta

rustc --version --verbose:

rustc 1.52.0-nightly (51748a8fc 2021-03-05)
binary: rustc
commit-hash: 51748a8fc77283914d4135f31b5966a407208187
commit-date: 2021-03-05
host: x86_64-unknown-linux-gnu
release: 1.52.0-nightly
LLVM version: 12.0.0

Error output

error: expected one of: `*`, `+`, or `?`
 --> perses_node_priority_with_dfs_delta_reduced_mutant.rs:3:29
  |
3 |     macro register_derive ($($f : expr,)) { $ (Box :: SyntaxExtension($f)) }
  |                             ^^^^^^^^^^^^

error: expected one of: `*`, `+`, or `?`
 --> perses_node_priority_with_dfs_delta_reduced_mutant.rs:3:47
  |
3 |     macro register_derive ($($f : expr,)) { $ (Box :: SyntaxExtension($f)) }
  |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0433]: failed to resolve: maybe a missing crate `rustc_expand`?
 --> perses_node_priority_with_dfs_delta_reduced_mutant.rs:1:5
  |
1 | use rustc_expand::base::SyntaxExtension;
  |     ^^^^^^^^^^^^ maybe a missing crate `rustc_expand`?

thread 'rustc' panicked at 'compiler/rustc_resolve/src/lib.rs:1929:21: undetermined resolution during main resolution pass', /rustc/51748a8fc77283914d4135f31b5966a407208187/library/std/src/panic.rs:59: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/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.52.0-nightly (51748a8fc 2021-03-05) running on x86_64-unknown-linux-gnu

query stack during panic:
end of query stack
error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0433`.
Backtrace

error: expected one of: `*`, `+`, or `?`
 --> perses_node_priority_with_dfs_delta_reduced_mutant.rs:3:29
  |
3 |     macro register_derive ($($f : expr,)) { $ (Box :: SyntaxExtension($f)) }
  |                             ^^^^^^^^^^^^

error: expected one of: `*`, `+`, or `?`
 --> perses_node_priority_with_dfs_delta_reduced_mutant.rs:3:47
  |
3 |     macro register_derive ($($f : expr,)) { $ (Box :: SyntaxExtension($f)) }
  |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0433]: failed to resolve: maybe a missing crate `rustc_expand`?
 --> perses_node_priority_with_dfs_delta_reduced_mutant.rs:1:5
  |
1 | use rustc_expand::base::SyntaxExtension;
  |     ^^^^^^^^^^^^ maybe a missing crate `rustc_expand`?

thread 'rustc' panicked at 'compiler/rustc_resolve/src/lib.rs:1929:21: undetermined resolution during main resolution pass', /rustc/51748a8fc77283914d4135f31b5966a407208187/library/std/src/panic.rs:59:5
stack backtrace:
   0: std::panicking::begin_panic
   1: std::panic::panic_any
   2: rustc_middle::ty::context::tls::with_opt
   3: rustc_middle::util::bug::opt_span_bug_fmt
   4: rustc_middle::util::bug::span_bug_fmt
   5: rustc_resolve::Resolver::resolve_ident_in_lexical_scope
   6: rustc_resolve::Resolver::resolve_path_with_ribs::{{closure}}
   7: rustc_resolve::Resolver::resolve_path_with_ribs
   8: rustc_resolve::late::LateResolutionVisitor::resolve_qpath_anywhere
   9: rustc_resolve::late::LateResolutionVisitor::smart_resolve_path_fragment
  10: rustc_resolve::late::LateResolutionVisitor::resolve_expr
  11: rustc_resolve::late::LateResolutionVisitor::resolve_expr
  12: <rustc_resolve::late::LateResolutionVisitor as rustc_ast::visit::Visitor>::visit_block
  13: <rustc_resolve::late::LateResolutionVisitor as rustc_ast::visit::Visitor>::visit_fn
  14: rustc_ast::visit::walk_item
  15: rustc_resolve::late::LateResolutionVisitor::resolve_item
  16: rustc_resolve::late::<impl rustc_resolve::Resolver>::late_resolve_crate
  17: rustc_session::utils::<impl rustc_session::session::Session>::time
  18: rustc_resolve::Resolver::resolve_crate
  19: rustc_interface::passes::configure_and_expand_inner
  20: rustc_interface::passes::configure_and_expand::{{closure}}
  21: rustc_data_structures::box_region::PinnedGenerator<I,A,R>::new
  22: rustc_interface::passes::configure_and_expand
  23: rustc_interface::queries::Queries::expansion
  24: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  25: rustc_span::with_source_map
  26: rustc_interface::interface::create_compiler_and_run
  27: rustc_span::with_session_globals
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose 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/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.52.0-nightly (51748a8fc 2021-03-05) running on x86_64-unknown-linux-gnu

query stack during panic:
end of query stack
error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0433`.

Activity

added
C-bugCategory: This is a bug.
I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
on Mar 7, 2021
added
A-resolveArea: Name/path resolution done by `rustc_resolve` specifically
A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
on Mar 7, 2021
jyn514

jyn514 commented on Mar 7, 2021

@jyn514
Member

Slightly smaller:

use x::y::z;
fn register_builtin_macros() {
    macro register_derive ($f:ident) {
        Box::z($f)
    }
    register_derive! { clone }
}
added a commit that references this issue on Mar 12, 2021
changed the title [-]ICE: 'compiler/rustc_resolve/src/lib.rs:1929:21: undetermined resolution during main resolution pass', /rustc/51748a8fc77283914d4135f31b5966a407208187/library/std/src/panic.rs:59:5[/-] [+]ICE: 'compiler/rustc_resolve/src/lib.rs:1929:21: undetermined resolution during main resolution pass', [/+] on Mar 15, 2021
JohnTitor

JohnTitor commented on Mar 29, 2021

@JohnTitor
Member

Triage: Fixed by #83103, marking as E-needs-test.

added
E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.
on Mar 29, 2021
added a commit that references this issue on Mar 30, 2021
55171e4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyC-bugCategory: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.glacierICE tracked in rust-lang/glacier.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @chengniansun@jyn514@JohnTitor@rust-lang-glacier-bot

      Issue actions

        ICE: 'compiler/rustc_resolve/src/lib.rs:1929:21: undetermined resolution during main resolution pass', · Issue #82865 · rust-lang/rust