chalk icon indicating copy to clipboard operation
chalk copied to clipboard

Extend Chalk with support for well-known, builtin traits

Open nikomatsakis opened this issue 4 years ago • 6 comments

This is a meta issue for the work of extending chalk to support the various built-in traits like Sized, Copy, and so forth.

  • [x] Extend TraitDefn with concept of "well-known trait" identifier #356
  • [x] Add basic support for the Sized trait https://github.com/rust-lang/chalk/issues/261
  • [x] Add support for a built-in Copy trait
    • In particular, Copy has built-in well-formedness requirements required for soundness
  • [x] Add support for a built-in Clone trait
    • Impls for tuples, closures are provided by rustc, at least
  • [x] Add support for built-in Fn traits
  • [x] Add support for built-in Unsize traits
  • [x] Unpin
  • [x] CoerceUnsized
  • [ ] DispatchFromDyn
  • [x] DiscriminantKind
  • [ ] Generator

This issue has been assigned to @Areredify via this comment.

nikomatsakis avatar Mar 27 '20 20:03 nikomatsakis

@rustbot claim

basil-cow avatar Apr 07 '20 05:04 basil-cow

I would also say that this issue is fairly 'parallelizable', so if others want to pick up some aspects of it, that's not a problem. e.g. I think we could add code for Copy and the like. Maybe it's a good idea to break those out into separate issues and write-up some mentoring instructions?

nikomatsakis avatar Apr 07 '20 14:04 nikomatsakis

Although they may be somewhat blocked on https://github.com/rust-lang/chalk/pull/371 -- having more details of Rust types would be useful.

nikomatsakis avatar Apr 07 '20 14:04 nikomatsakis

So if someone wants to pick it up, I am done with Copy, Drop and Clone (as far as I understood Clone introduces no hard coded impls and/or wf checks?) modulo #371 of course, but it will be easy to address when it comes to it. Going to pick up Unsize next

basil-cow avatar Apr 07 '20 14:04 basil-cow

Im already working on CoerceUnsized

basil-cow avatar Jun 09 '20 21:06 basil-cow

I'll try Unpin

memoryleak47 avatar Sep 05 '20 22:09 memoryleak47