Skip to content

ICE: Opaque types got hidden types registered from within subtype predicate #125516

@msfjarvis

Description

@msfjarvis

Code

https://github.com/teloxide/teloxide/blob/bd98ba7e613e0fd7ec4fd1c210fc5edbb048f975/crates/teloxide-core/src/types/update.rs#L195

I wasn't able to create a minimal reproducer :(

Here's the source code of the project where the crash is triggered: https://github.com/msfjarvis/linkleaner/tree/1a327237a91f80fcead1826d4fc916704ed6a027

Meta

rustc --version --verbose:

rustc 1.80.0-nightly (867900499 2024-05-23)
binary: rustc
commit-hash: 8679004993f08807289911d9f400f4ac4391d2bc
commit-date: 2024-05-23
host: x86_64-unknown-linux-gnu
release: 1.80.0-nightly
LLVM version: 18.1.6

The last rustc build that this project was using is nightly-2024-01-09, where this crash does not happen.

Error output

error: internal compiler error: compiler/rustc_infer/src/infer/mod.rs:968:17: opaque types got hidden types registered from within subtype predicate: either::Either<either::Either<Alias(Opaque, AliasTy { args: ['?50], def_id: DefId(0:32657 ~ teloxide_core[4d4f]::types::poll::{impl#0}::mentioned_users::{opaque#0}) }), ?200t>, ?201t> vs either::Either<either::Either<Alias(Opaque, AliasTy { args: ['?50], def_id: DefId(0:32657 ~ teloxide_core[4d4f]::types::poll::{impl#0}::mentioned_users::{opaque#0}) }), ?204t>, ?205t>
   --> /home/msfjarvis/.cargo/git/checkouts/teloxide-cd43b5216a237e6a/bd98ba7e613e/crates/teloxide-core/src/types/update.rs:195:54
    |
195 |             UpdateKind::ChosenInlineResult(query) => i1(once(&query.from)),
    |                                                      ^^^^^^^^^^^^^^^^^^^^^

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions