hax icon indicating copy to clipboard operation
hax copied to clipboard

Implicit Trait Constraints

Open karthikbhargavan opened this issue 1 year ago • 1 comments
trafficstars

When adding a constraint of the form T: Copy, rustc always adds a second constraint T:Copy+Clone. Consequently, the generated typeclass in F* has both constraints (to be solved). However, the corresponding instance (trait implementation) in F* only solved the first constraint, leading to a lax-checking error.

karthikbhargavan avatar Apr 24 '24 07:04 karthikbhargavan

Requires some investigation, marking it as small for now.

W95Psp avatar Apr 30 '24 07:04 W95Psp

This issue has been marked as stale due to a lack of activity for 60 days. If you believe this issue is still relevant, please provide an update or comment to keep it open. Otherwise, it will be closed in 7 days.

github-actions[bot] avatar Aug 30 '24 02:08 github-actions[bot]

This issue has been closed due to a lack of activity since being marked as stale. If you believe this issue is still relevant, please reopen it with an update or comment.

github-actions[bot] avatar Sep 06 '24 02:09 github-actions[bot]

Seems like I can't reproduce any longer:

trait T: Clone {
    type U: Clone;    
}
impl T for () {
    type U = ();  
}

fn f<T: Clone>() {}


Open this code snippet in the playground

Let's keep this issue closed then!

W95Psp avatar Sep 16 '24 06:09 W95Psp