

Continue work on associated const equality by JulianKnodt · Pull Request #93285...
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.

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
-
13
Contributor nikomatsakis ...
-
16
Contributor JulianKnodt commented
-
11
Contributor Author JulianKnodt commented...
-
10
Copy link Contributor bors commented
-
12
Copy link Contributor JulianKnodt c...
-
9
Copy link Contributor bugadani...
-
12
Copy link Member scottmcm commented
-
9
Copy link Contributor hyd-dev commented...
-
12
Copy link Member camelid commente...
-
10
Copy link Contributor
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK