-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Refactor the Qualif
trait
#67335
Refactor the Qualif
trait
#67335
Conversation
For background, enum Qualified {
Never,
Structurally,
Always,
}
Since they are "atomic" (i.e., not made up of component parts), primitive types are either |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
I would include the enum-as-explanation + the table in the rustdocs. :) |
☔ The latest upstream changes (presumably #67455) made this pull request unmergeable. Please resolve the merge conflicts. |
@ecstatic-morse can you rebase this? thanks |
ping from triage @ecstatic-morse, could you rebase? thank you |
49fedba
to
6280a8f
Compare
☔ The latest upstream changes (presumably #69271) made this pull request unmergeable. Please resolve the merge conflicts. |
Ping from triage: |
@eddyb should I just close this? |
@ecstatic-morse I don't know, I like this design but I don't remember what was up with this PR - I think I just never got around to review it, and perhaps when I got notified it needed a rebase or something? |
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.
r=me after a rebase
6280a8f
to
8275ae2
Compare
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
8275ae2
to
6f75d3f
Compare
@bors r=eddyb |
📌 Commit 6f75d3f has been approved by |
…ddyb Refactor the `Qualif` trait This PR attempts to preserve the existing semantics of the `Qualif` trait while reducing its API to two significant methods with descriptive names, `in_any_value_of_ty` and `in_adt_inherently`. The other `in_*` methods have been made into free functions, since they should never be overloaded. Finally, I changed the bounds on the `in_local` argument to be less restrictive (`FnMut` instead of `Fn`), which addresses a FIXME in the const-checker. r? @eddyb cc @pnkfelix @oli-obk
Rollup of 7 pull requests Successful merges: - #67335 (Refactor the `Qualif` trait) - #69122 (Backtrace Debug tweaks) - #69520 (Make error message clearer about creating new module) - #69738 (More Method -> AssocFn renaming) - #69867 (Add long error explanation for E0628 ) - #69989 (resolve/hygiene: `macro_rules` are not "legacy") - #70036 (Make article_and_description primarily use def_kind) Failed merges: r? @ghost
This PR attempts to preserve the existing semantics of the
Qualif
trait while reducing its API to two significant methods with descriptive names,in_any_value_of_ty
andin_adt_inherently
. The otherin_*
methods have been made into free functions, since they should never be overloaded. Finally, I changed the bounds on thein_local
argument to be less restrictive (FnMut
instead ofFn
), which addresses a FIXME in the const-checker.r? @eddyb
cc @pnkfelix @oli-obk