Skip to content

assertion failed: (left == right) #84800

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
popey456963 opened this issue May 1, 2021 · 2 comments
Closed

assertion failed: (left == right) #84800

popey456963 opened this issue May 1, 2021 · 2 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

@popey456963
Copy link

Code

use hyper::service::{make_service_fn, service_fn};
use hyper::{Body, Method, Request, Response, Server, StatusCode};

/// This is our service handler. It receives a Request, routes on its
/// path, and returns a Future of a Response.
async fn echo(req: Request<Body>) -> Result<Response<Body>, hyper::Error> {
    match req.method() {
        &Method::GET | &Method::HEAD | &Method::OPTIONS => Ok(Response::new(Body::from(
            "hello"
        ))),

        _ => {
            let mut not_found = Response::default();
            *not_found.status_mut() = StatusCode::NOT_FOUND;
            Ok(not_found)
        }
    }
}

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
    let addr = ([127, 0, 0, 1], 8080).into();

    let service = make_service_fn(|_| async { Ok::<_, hyper::Error>(service_fn(echo)) });

    let server = Server::bind(&addr).serve(service);

    println!("Listening on http://{}", addr);

    server.await?;

    Ok(())
}

Meta

rustc --version --verbose:

rustc 1.53.0-nightly (42816d61e 2021-04-24)
binary: rustc
commit-hash: 42816d61ead7e46d462df997958ccfd514f8c21c
commit-date: 2021-04-24
host: x86_64-pc-windows-msvc
release: 1.53.0-nightly
LLVM version: 12.0.0

Error output

[Running 'cargo run']
   Compiling rust-web-cache v0.1.0 (C:\Users\Alexander\Documents\GitHub\rust-web-cache)
thread 'rustc' panicked at 'assertion failed: `(left == right)`
  left: `Some(Fingerprint(5470276718078248376, 15374897831268093844))`,
 right: `Some(Fingerprint(9529934247628153318, 14312929490556852544))`: found unstable fingerprints for predicates_of(core[d23b]::marker::Sync): GenericPredicates { parent: None, predicates: [(Binder(TraitPredicate(<Self as std::marker::Sync>), []), C:\Users\Alexander\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\marker.rs:469:1: 469:27 (#0))] }', /rustc/42816d61ead7e46d462df997958ccfd514f8c21c\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 (42816d61e 2021-04-24) 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::marker::Sync`
#1 [object_safety_violations] determine object safety of trait `std::marker::Sync`
#2 [check_item_well_formed] checking that `main` is well-formed
#3 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `rust-web-cache`

To learn more, run the command again with --verbose.
[Finished running. Exit status: 0]
@popey456963 popey456963 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 1, 2021
@popey456963
Copy link
Author

No such error on stable.

@Aaron1011
Copy link
Member

Duplicate of #84341. This is fixed in the latest nightly

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