rust icon indicating copy to clipboard operation
rust copied to clipboard

internal refactoring: cleanup type relations

Open lcnr opened this issue 1 year ago • 1 comments

we should try to clean up our type relations further:

  • [ ] try to unify Equate and Sub to make them closer to nll::TypeRelating
  • [ ] merge Lub and Glb into the same (maybe generic) type relation, prolly just with a field
  • [ ] reuse more components, e.g. instantiating infer vars should be shared, not only generalize
  • [ ] completely merge Equate/Sub and nll:TypeRelating

I intend to look into this myself but would also appreciate some help. This is a quite involved and sometimes subtle area however and I don't have the capacity for in-depth mentoring rn

lcnr avatar Feb 15 '24 19:02 lcnr

try to unify Equate and Sub to make them closer to nll::TypeRelating

It seems to be done by #121462, I guess?

ShoyuVanilla avatar Mar 10 '24 12:03 ShoyuVanilla

completely merge Equate/Sub and nll:TypeRelating

And nll::TypeRelating is moved into rustc_borrowck in #121321

ShoyuVanilla avatar Mar 11 '24 02:03 ShoyuVanilla