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

const definitions are not allowed in impl blocks #749

Closed
jhjourdan opened this issue Apr 24, 2023 · 4 comments
Closed

const definitions are not allowed in impl blocks #749

jhjourdan opened this issue Apr 24, 2023 · 4 comments

Comments

@jhjourdan
Copy link
Collaborator

There is no reason to allow them globally but not in impl blocks.

@xldenis
Copy link
Collaborator

xldenis commented Apr 24, 2023

? are you saying we shouldn't allow them globally but should allow them in impls? Or that we should allow them everywhere?

@jhjourdan
Copy link
Collaborator Author

I think they should be allowed everywhere, and that I don't see why it would be more complicated to accept them (in non-trait-instantiation) impl blocks. So I consider this a s "bug" (or lack of an expected feature) if this is not possible.

@xldenis
Copy link
Collaborator

xldenis commented Apr 25, 2023

Indeed, but const blocks are handled in a special way which breaks compilation in Creusot. I believe @voidc had sketched a solution at some point.

@voidc
Copy link
Collaborator

voidc commented May 4, 2023

Closed by #765.

@voidc voidc closed this as completed May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants