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

Implementation of crate-item-ok-goal for function declarations differs from description #107

Open
voidc opened this issue Sep 24, 2022 · 0 comments

Comments

@voidc
Copy link
Contributor

voidc commented Sep 24, 2022

The description of crate-item-ok-goal for function declarations specifies that

For a fn declaration declared in the crate C, like the following:

fn foo<'a, T>(t: &'a T) -> u32 where T: Ord { ... }

We generate the following goal, which specifies that -- assuming the generics
are well formed and the where-clauses hold -- the field types are well-formed:

(∀ ((lifetime A) (type T))
    (implies ((well-formed (lifetime A))
              (well-formed (type T))
              (well-formed (type (rigid-ty (ref ()) (A (rigid-ty T ()))))))
      (well-formed-goal-for-biformula (T : Trait_Ord ()))))

but the implementation does not create well-formed clauses for the function's argument or return types.
https://github.com/nikomatsakis/a-mir-formality/blob/038b0e1ccfb2a3f591688d5855a42c129d577e85/racket-src/decl/decl-ok/crate-item.rkt#L56:L61

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

1 participant