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

fix(hax-lib): use super::* in refinement expansion #762

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

W95Psp
Copy link
Collaborator

@W95Psp W95Psp commented Jul 10, 2024

This commit fixes #761.

Considering:

use some::path::to::T;

pub struct MyRefinedType(T);

The generated code wraps the struct declaration in a module. That module used not to have T in scope.

This commit adds a use super::* before declaring the type of the refinement type.

This commit fixes #761.

Considering:
```rust
use some::path::to::T;

pub struct MyRefinedType(T);
```

The generated code wraps the struct declaration in a module.
That module used not to have `T` in scope.

This commit adds a `use super::*` before declaring the type of the
refinement type.
@W95Psp W95Psp enabled auto-merge July 10, 2024 05:53
@W95Psp W95Psp added this pull request to the merge queue Jul 10, 2024
Merged via the queue into main with commit 45be3ca Jul 10, 2024
13 checks passed
@W95Psp W95Psp deleted the add-use-super-refinement branch July 10, 2024 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

hax-lib: refinement: scoping issues
2 participants