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

Binder-related crash when instantiating structure in type alias #375

Open
R1kM opened this issue Sep 20, 2024 · 0 comments · May be fixed by #376
Open

Binder-related crash when instantiating structure in type alias #375

R1kM opened this issue Sep 20, 2024 · 0 comments · May be fixed by #376
Assignees
Labels
C-bug A bug in charon

Comments

@R1kM
Copy link
Member

R1kM commented Sep 20, 2024

The following Rust code crashes when running Charon version 1bd0af9 on it

struct S1;

trait T1 {}

struct S2<U: T1> { x: U }

type S3 = S2<S1>;

with the error

error[E9999]: Cannot handle error `Unimplemented` selecting `Binder { value: <S1 as T1>, bound_vars: [] }`
  |
  = note: ⚠️ This is a bug in Hax's frontend.
          Please report this error to https://github.com/hacspec/hax/issues with some context (e.g. the current crate)!

error: Thread panicked when extracting item `test_crate::S3`.
 --> tests/ui/bug.rs:7:1
  |
7 | type S3 = S2<S1>;
  | ^^^^^^^

Note, while the error seems to be occurring in Hax's frontend, this code does not crash the current main branch of hax (288f77f0) when running on the Hax playground.

cc @W95Psp

@R1kM R1kM added the C-bug A bug in charon label Sep 20, 2024
@Nadrieril Nadrieril changed the title Binder-related crash when instantiating structure Binder-related crash when instantiating structure in type alias Sep 20, 2024
@Nadrieril Nadrieril self-assigned this Sep 20, 2024
@Nadrieril Nadrieril linked a pull request Sep 23, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug A bug in charon
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants