rust-lang / chalk

An implementation and definition of the Rust trait system using a PROLOG-like logic solver
https://rust-lang.github.io/chalk/book/
Other
1.81k stars 179 forks source link

Add support for `Pointee` trait #794

Closed HKalbasi closed 1 year ago

HKalbasi commented 1 year ago

cc https://github.com/rust-lang/rust-analyzer/issues/13992

HKalbasi commented 1 year ago

It doesn't support dyn Trait, since I didn't find out how declare lang item structs for chalk. If it is easy, I can add it with some mentoring, otherwise I think it can be deferred to another PR.

HKalbasi commented 1 year ago

@jackh726 Can you please review this?

compiler-errors commented 1 year ago

Other than a few nits, I guess this fine to land.

@HKalbasi what's the reason you need this? Is this affecting users in r-a?

HKalbasi commented 1 year ago

Is this affecting users in r-a?

It will, if they use this unstable feature, but I'm adding this now since it is used in internal implementation of the standard library. I'm currently experimenting with interpreting unit tests using r-a without compiling code, and I'm constantly hitting this.

HKalbasi commented 1 year ago

@compiler-errors Thanks for review so far. I think I have addressed your comments. Can you please take another look?

compiler-errors commented 1 year ago

@bors r+

bors commented 1 year ago

:pushpin: Commit 16a3b37a69ac271149db5c8bf736e470ad6bb781 has been approved by compiler-errors

It is now in the queue for this repository.

bors commented 1 year ago

:hourglass: Testing commit 16a3b37a69ac271149db5c8bf736e470ad6bb781 with merge dcd91d05e9e99e40b1b32a9303208c9c3d410449...

bors commented 1 year ago

:sunny: Test successful - checks-actions Approved by: compiler-errors Pushing dcd91d05e9e99e40b1b32a9303208c9c3d410449 to master...