Skip to content

rustc 1.53.0-nightly panics on "computing predicates of std::ops::FnMut" #83951

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
SakulFlee opened this issue Apr 6, 2021 · 2 comments
Closed
Labels
A-incr-comp Area: Incremental compilation 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

@SakulFlee
Copy link

I am following the Bevy Tutorial and encountered the following compiler panic.

I followed the suggested compilation time optimisations from Bevy: Bevy Tutorial - Setup (Scroll down to "Enable Fast Compilation").
Furthermore, I am using sccache.
However, with or without those changes, I get the same panic.

Code

src/main.rs:

use bevy::prelude::*;

fn hello_world() {
    println!("Hello, world!");
}

fn main() {
    App::build().add_system(hello_world.system()).run();
}

Cargo.toml:

[package]
name = "bevy_tutorial"
version = "0.1.0"
authors = ["Lukas Weber <[email protected]>"]
edition = "2018"

[dependencies]
bevy = "0.5.0"

~/.cargo/config:

# SCCACHE
[build]
rustc-wrapper = "sccache"

[target.x86_64-unknown-linux-gnu]
linker = "/usr/bin/clang"
rustflags = ["-Clink-arg=-fuse-ld=lld", "-Zshare-generics=y"]

[target.x86_64-apple-darwin] # `brew install michaeleisel/zld/zld`
rustflags = [
    "-C",
    "link-arg=-fuse-ld=/usr/local/bin/zld",
    "-Zshare-generics=y",
    "-Csplit-debuginfo=unpacked"
]

[target.x86_64-pc-windows-msvc]
linker = "rust-lld.exe"
rustflags = ["-Zshare-generics=y"]

# Optional: Uncommenting the following improves compile times, but reduces the amount of debug info to 'line 
number tables only'
# In most cases the gains are negligible, but if you are on macos and have slow compile times you should see 
significant gains.
#[profile.dev]
#debug = 1

Meta

rustc --version --verbose:

rustc 1.53.0-nightly (07e0e2ec2 2021-03-24)
binary: rustc
commit-hash: 07e0e2ec268c140e607e1ac7f49f145612d0f597
commit-date: 2021-03-24
host: x86_64-pc-windows-msvc
release: 1.53.0-nightly
LLVM version: 12.0.0

Error output

   Compiling bevy_tutorial v0.1.0 (C:\Users\me\OneDrive\Workspace\bevy_tutorial)
thread 'rustc' panicked at 'found unstable fingerprints for predicates_of(core[f48f]::ops::function::FnMut): 
GenericPredicates { parent: None, predicates: [(Binder(TraitPredicate(<Self as std::ops::FnOnce<Args>>)), C:\Users\me\scoop\persist\rustup-msvc\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\ops\function.rs:147:24: 147:36 (#0)), (Binder(TraitPredicate(<Args as std::marker::Sized>)), C:\Users\me\scoop\persist\rustup-msvc\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\ops\function.rs:147:17: 147:21 (#0)), (Binder(TraitPredicate(<Self as std::ops::FnMut<Args>>)), C:\Users\me\scoop\persist\rustup-msvc\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\ops\function.rs:147:1: 147:36 (#0))] }', /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597\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.53.0-nightly (07e0e2ec2 2021-03-24) running on x86_64-pc-windows-msvc

note: compiler flags: -Z share-generics=y -Z share-generics=y -C embed-bitcode=no -C debuginfo=2 -C linker=rust-lld.exe -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::FnMut`
#1 [param_env] computing normalized predicates of `std::ops::FnMut::call_mut`
end of query stack
error: could not compile `bevy_tutorial`

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

   Compiling bevy_tutorial v0.1.0 (C:\Users\me\OneDrive\Workspace\bevy_tutorial)
thread 'rustc' panicked at 'found unstable fingerprints for predicates_of(core[f48f]::ops::function::FnMut): 
GenericPredicates { parent: None, predicates: [(Binder(TraitPredicate(<Self as std::ops::FnOnce<Args>>)), C:\Users\me\scoop\persist\rustup-msvc\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\ops\function.rs:147:24: 147:36 (#0)), (Binder(TraitPredicate(<Args as std::marker::Sized>)), C:\Users\me\scoop\persist\rustup-msvc\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\ops\function.rs:147:17: 147:21 (#0)), (Binder(TraitPredicate(<Self as std::ops::FnMut<Args>>)), C:\Users\me\scoop\persist\rustup-msvc\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\ops\function.rs:147:1: 147:36 (#0))] }', /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597\compiler\rustc_query_system\src\query\plumbing.rs:593:5
stack backtrace:
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.53.0-nightly (07e0e2ec2 2021-03-24) running on x86_64-pc-windows-msvc

note: compiler flags: -Z share-generics=y -Z share-generics=y -C embed-bitcode=no -C debuginfo=2 -C linker=rust-lld.exe -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::FnMut`
#1 [param_env] computing normalized predicates of `std::ops::FnMut::call_mut`
#2 [mir_shims] generating MIR shim for `std::ops::FnMut::call_mut`
#3 [collect_and_partition_mono_items] collect_and_partition_mono_items
end of query stack
error: could not compile `bevy_tutorial`

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

@SakulFlee SakulFlee 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 Apr 6, 2021
@Aaron1011
Copy link
Member

You can run cargo clean to work around this. A full fix is being worked on in #83591

@jyn514 jyn514 added the A-incr-comp Area: Incremental compilation label Apr 7, 2021
@SakulFlee
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-incr-comp Area: Incremental compilation 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