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

error: internal compiler error: unexpected panic #85025

Closed
rajneeshaggarwal opened this issue May 7, 2021 · 3 comments
Closed

error: internal compiler error: unexpected panic #85025

rajneeshaggarwal opened this issue May 7, 2021 · 3 comments
Labels
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.

Comments

@rajneeshaggarwal
Copy link

Code

fn print(input_string: String) {
    println!("{}", input_string);
}

fn main() {
    let test_string = "Hello, world!";
    print(test_string.to_string());
}

Meta

rustc --version --verbose:

rustc 1.52.0 (88f19c6da 2021-05-03)
binary: rustc
commit-hash: 88f19c6dab716c6281af7602e30f413e809c5974
commit-date: 2021-05-03
host: x86_64-pc-windows-msvc
release: 1.52.0
LLVM version: 12.0.0

Error output

Compiling hello_world v0.1.0 (D:\workspaces\rust\hello_world)
     Running `rustc --crate-name hello_world --edition=2018 src\main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=6a1f1d5942564855 --out-dir D:\workspaces\rust\hello_world\target\debug\deps -C incremental=D:\workspaces\rust\hello_world\target\debug\incremental -L dependency=D:\workspaces\rust\hello_world\target\debug\deps`
thread 'rustc' panicked at 'found unstable fingerprints for predicates_of(core[bd3a]::ops::function::Fn): GenericPredicates { parent: None, predicates: [(Binder(TraitPredicate(<Self as std::ops::FnMut<Args>>)), C:\Users\rajneesh.kumar\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\ops\function.rs:67:21: 67:32 (#0)), (Binder(TraitPredicate(<Args as std::marker::Sized>)), C:\Users\rajneesh.kumar\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\ops\function.rs:67:14: 67:18 (#0)), (Binder(TraitPredicate(<Self as std::ops::Fn<Args>>)), C:\Users\rajneesh.kumar\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\ops\function.rs:67:1: 67:32 (#0))] }', /rustc/88f19c6dab716c6281af7602e30f413e809c5974\compiler\rustc_query_system\src\query\plumbing.rs:593: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 (88f19c6da 2021-05-03) running on x86_64-pc-windows-msvc

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type bin

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [predicates_of] computing predicates of `std::ops::Fn`
#1 [vtable_methods] finding all methods for trait std::ops::Fn
end of query stack
error: could not compile `hello_world`

Caused by:
  process didn't exit successfully: `rustc --crate-name hello_world --edition=2018 src\main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=6a1f1d5942564855 --out-dir D:\workspaces\rust\hello_world\target\debug\deps -C incremental=D:\workspaces\rust\hello_world\target\debug\incremental -L dependency=D:\workspaces\rust\hello_world\target\debug\deps` (exit code: 101)
Backtrace

<backtrace>

@rajneeshaggarwal rajneeshaggarwal 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 May 7, 2021
@hellow554
Copy link
Contributor

To quote @Aaron1011:

This is a known issue - unfortunately, there isn't a fix for it at the moment. As a workaround, you can run cargo clean -p <your_crate_name>, which will allow you to compile it.

@Aaron1011 may it be worth to pin the original issue on the issue page?

@rajneeshaggarwal
Copy link
Author

I was able to run the same with nightly build. Don't understand why is this issue coming with stable branch.

@wesleywiser
Copy link
Member

Thanks for filing the bug report @rajneeshaggarwal! The reason you're seeing this on stable but not nightly is that this bug has been fixed on nightly already. We are releasing 1.52.1 momentarily to work around this issue on stable (you can read more about this issue in #84970).

We are currently triaging issues related to #84970 to ensure each underlying problem gets resolved. Since this appears to be a duplicate of #83259 so I'm going to close in favor of that issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

No branches or pull requests

3 participants