-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Continue work on associated const equality #93285
Conversation
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #93095) made this pull request unmergeable. Please resolve the merge conflicts. |
945146c
to
85f270b
Compare
Hm, after naively adding in |
This comment has been minimized.
This comment has been minimized.
85f270b
to
17f2dac
Compare
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #93352) made this pull request unmergeable. Please resolve the merge conflicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, I like this a lot more than the previous version, thanks for trying it out!
You accidentally included a cargo submodule update.
compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs
Outdated
Show resolved
Hide resolved
Hmm... can you point me to the source of examples that you think are unreachable for constants (or is it just those that now have |
It's mostly the points where there are |
8bda326
to
2d7af2d
Compare
2d7af2d
to
a34b8a3
Compare
This comment has been minimized.
This comment has been minimized.
a34b8a3
to
b5d0002
Compare
This comment has been minimized.
This comment has been minimized.
b5d0002
to
e43c5aa
Compare
This comment has been minimized.
This comment has been minimized.
e43c5aa
to
2d6a0cd
Compare
This comment has been minimized.
This comment has been minimized.
2d6a0cd
to
f5ff1a6
Compare
This comment has been minimized.
This comment has been minimized.
📌 Commit 78fb74a has been approved by |
💡 This pull request was already approved, no need to approve it again.
|
📌 Commit 78fb74a has been approved by |
I'm not sure if that's how it's done but I hope it's fine? |
@JulianKnodt it's |
@mati865: 🔑 Insufficient privileges: Not in reviewers |
@bors r- |
@bors r+ Sorry about the lack of instructions. |
📌 Commit 78fb74a has been approved by |
my bad, I should've asked before just doing |
☀️ Test successful - checks-actions |
Finished benchmarking commit (1ea4851): comparison url. Summary: This benchmark run did not return any relevant results. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
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 othertodo!()
s which I think may not be hit.r? @oli-obk
Updates #92827