8

Continue work on associated const equality by JulianKnodt · Pull Request #93285...

 3 years ago
source link: https://github.com/rust-lang/rust/pull/93285
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Copy link

Contributor

JulianKnodt commented 23 days ago

edited

This actually implements some more complex logic for assigning associated consts to values.
Inside of projection candidates, it now defers to a separate function for either consts or
types. To reduce amount of code, projections are now generic over T, where T is either a Type or
a Const. I can add some comments back later, but this was the fastest way to implement it.

It also now finds the correct type of consts in type_of.


The current main TODO is finding the const of the def id for the LeafDef.

Right now it works if the function isn't called, but once you use the trait impl with the bound it fails inside projection.
I was hoping to get some help in getting the &'tcx ty::Const<'tcx>, in addition to a bunch of other todo!()s which I think may not be hit.

r? @oli-obk

Updates #92827


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK