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

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

Closed
chengniansun opened this issue Mar 7, 2021 · 2 comments · Fixed by #83656
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) A-resolve Area: Path resolution C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@chengniansun
Copy link

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`.

@chengniansun chengniansun added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 7, 2021
@jyn514 jyn514 added A-resolve Area: Path resolution A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) labels Mar 7, 2021
@jyn514
Copy link
Member

jyn514 commented Mar 7, 2021

Slightly smaller:

use x::y::z;
fn register_builtin_macros() {
    macro register_derive ($f:ident) {
        Box::z($f)
    }
    register_derive! { clone }
}

fanninpm added a commit to fanninpm/glacier that referenced this issue Mar 12, 2021
@rust-lang-glacier-bot rust-lang-glacier-bot added the glacier ICE tracked in rust-lang/glacier. label Mar 12, 2021
@chengniansun chengniansun 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', Mar 15, 2021
@JohnTitor
Copy link
Member

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

@JohnTitor JohnTitor added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Mar 29, 2021
@bors bors closed this as completed in 55171e4 Mar 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) A-resolve Area: Path resolution C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants