weiznich / rust-foundation-community-grant

20 stars 6 forks source link

Add entrait test case #7

Closed audunhalland closed 2 years ago

audunhalland commented 2 years ago

This test case describes a problem with deep-stack trait resolution: The root of the problem is a missing T4 implementation, but the error message only mentions T1 and T2. It should instead point to the root of the problem.

I made this test case without pulling in the entrait dependency, instead I just wrote explicitly what the macro does.

audunhalland commented 2 years ago

Note that entrait is not a "trait-heavy crate" per se. It's a macro that turns the user's code into a trait-heavy crate. So not entirely sure if this fits in here.

weiznich commented 2 years ago

Thanks for adding this test case. I would prefer a real example using entrait here instead of a minimal version as the basic idea is to propose real improvements to real crates instead of just working with artificial examples.

audunhalland commented 2 years ago

Fixed in second commit.

weiznich commented 2 years ago

Thanks, will have a look next week after being back from my holidays.