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

[declare] Warn on unused using attributes on sub-obligations #19007

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ejgallego
Copy link
Member

Continuation of #18890

@coqbot-app coqbot-app bot added the needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. label May 6, 2024
@ejgallego ejgallego added this to TODO in Proof Handling via automation May 6, 2024
@ejgallego ejgallego moved this from TODO to Ready in Proof Handling May 6, 2024
@ejgallego
Copy link
Member Author

This doesn't seem to work well yet, not sure if worth it.

Comment on lines +2588 to 2591
let () = warn_unused_using () ?loc:None in
let using = Internal.get_using prg in
let env = Global.env () in
let f {CInfo.name; typ; _} = name, [typ] in
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The warning should be when using is non-None, and, then, the idea would be that the useless computation that follows is removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI.
Projects
Proof Handling
  
Ready
Development

Successfully merging this pull request may close these issues.

None yet

2 participants