-
Notifications
You must be signed in to change notification settings - Fork 109
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
Unsupported constant type Ref(...)
#1268
Comments
===
does not work for enumRef(...)
The issue arises when you use |
There is a workaround for this problem: You can write a pure function which returns the constant. This only works if the type is #[pure]
// Work around Prusti limitation. ("unsupported constant type")
fn none<T: Copy>() -> Option<T> {
None
}
#[requires(x === none())]
fn demo(x: Option<bool>) {} |
5 tasks
Aurel300
added a commit
to Aurel300/prusti-dev
that referenced
this issue
Feb 21, 2023
Aurel300
added a commit
to Aurel300/prusti-dev
that referenced
this issue
Feb 21, 2023
fpoli
pushed a commit
to Aurel300/prusti-dev
that referenced
this issue
Feb 28, 2023
Aurel300
added a commit
that referenced
this issue
Feb 28, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Logical Equality currently does not work for enums:
Error on
=== TestEnum::Nil
:The text was updated successfully, but these errors were encountered: