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

Internal Compiler Error #85134

Closed
ezhang7423 opened this issue May 10, 2021 · 1 comment
Closed

Internal Compiler Error #85134

ezhang7423 opened this issue May 10, 2021 · 1 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.

Comments

@ezhang7423
Copy link

Code

use std::cmp::Ordering;
use std::io;

fn main() {
    println!("Guess my number!");

    let my_num = rand::random::<u8>();

    let mut tries = 0;
    loop {
        let guess = get_guess();
        match guess.cmp(&my_num) {
            Ordering::Less => println!("Guess bigger"),
            Ordering::Equal => {
                println!("You got it! It took you {} tries", tries);
                break;
            }
            Ordering::Greater => println!("Guess smaller"),
        }
        tries += 1;
    }
}

fn get_guess() -> u8 {
    let mut guess = String::new();
    io::stdin()
        .read_line(&mut guess)
        .expect("Failed to read input");

    println!("You entered {}", guess);

    return guess.trim().parse().expect("Please type a number!");
}

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

PS C:\Users\Eddie\git\rusthello> cargo run --verbose 
       Fresh cfg-if v1.0.0
       Fresh ppv-lite86 v0.2.10
       Fresh getrandom v0.2.2
       Fresh rand_core v0.6.2
       Fresh rand_chacha v0.3.0
       Fresh rand v0.8.3
   Compiling rusthello v0.1.0 (C:\Users\Eddie\git\rusthello)
     Running `rustc --crate-name rusthello --edition=2018 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=130a3278fcf10837 --out-dir C:\Users\Eddie\git\rusthello\target\debug\deps -C incremental=C:\Users\Eddie\git\rusthello\target\debug\incremental -L dependency=C:\Users\Eddie\git\rusthello\target\debug\deps --extern rand=C:\Users\Eddie\git\rusthello\target\debug\deps\librand-cf02a276127e463a.rlib`
thread 'rustc' panicked at 'found unstable fingerprints for predicates_of(core[bd3a]::fmt::Debug): GenericPredicates { parent: None, predicates: [(Binder(TraitPredicate(<Self as std::fmt::Debug>)), C:\Users\Eddie\.rustup\toolchains\stable-x0:16 (#0))] }', /rustc/88f19c6dab716c6281af7602e30f413e809c5974\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.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::fmt::Debug`
#1 [vtable_methods] finding all methods for trait std::fmt::Debug
#2 [collect_and_partition_mono_items] collect_and_partition_mono_items
end of query stack
error: could not compile `rusthello`

Caused by:
  process didn't exit successfully: `rustc --crate-name rusthello --edition=2018 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=130a3278fcf10837 --out-dir C:\Users\Eddie\git\rusthello\target\debug\deps -C incremental=C:\Users\Eddie\git\rusthello\target\debug\incremental -L dependency=C:\Users\Eddie\git\rusthello\target\debug\deps --extern rand=C:\Users\Eddie\git\rusthello\target\debug\deps\librand-cf02a276127e463a.rlib` (exit code: 101)
Backtrace

query stack during panic:
#0 [predicates_of] computing predicates of `std::fmt::Debug`
#1 [vtable_methods] finding all methods for trait std::fmt::Debug
#2 [collect_and_partition_mono_items] collect_and_partition_mono_items
end of query stack

@ezhang7423 ezhang7423 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 10, 2021
@wesleywiser
Copy link
Member

Thanks for the bug report! It looks like this is the same issue as #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

2 participants