-
Notifications
You must be signed in to change notification settings - Fork 13.8k
rename select_where_possible
and select_all_or_error
#147111
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
rename select_where_possible
and select_all_or_error
#147111
Conversation
Some changes occurred in compiler/rustc_codegen_ssa Some changes occurred to the CTFE machinery Some changes occurred in engine.rs, potentially modifying the public API of Some changes occurred to constck cc @fee1-dead Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor Some changes occurred in compiler/rustc_passes/src/check_attr.rs Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
I feel like the "registered" part of these methods names is redundant, and removing it would make the method names appreciably shorter. Not sure if there's any value in being explicit about only evaluating "registered" obligations. |
This comment has been minimized.
This comment has been minimized.
I've been clippy'd 😔 @compiler-errors I was worried it might imply the methods accept a list of obligations to evaluate, but I think you're right that we could just drop the
|
Some changes occurred in src/tools/clippy cc @rust-lang/clippy rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead. cc @rust-lang/rust-analyzer |
ah I should revert the r-a changes, I didn't realise r-a had its own fullfillment ctxt impl |
Could also use lgtm |
We'll probably want to rename it there, so the code stays closer to what's in rustc. |
i'd go with
|
467a300
to
99b93bb
Compare
after looking at it and chatting with Boxy, Please change to
@rustbot author |
99b93bb
to
77e7396
Compare
This comment has been minimized.
This comment has been minimized.
77e7396
to
42eba3e
Compare
let errors = ocx.select_where_possible(); | ||
let errors = ocx.try_evaluate_obligations(); | ||
if !errors.is_empty() { | ||
return None; |
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.
this is the only try_evaluate_obligations
in this function and it feels odd :> ah well
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.
some nits, then r=me
☔ The latest upstream changes (presumably #147210) made this pull request unmergeable. Please resolve the merge conflicts. |
42eba3e
to
d8634f7
Compare
d8634f7
to
8e9b0c4
Compare
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
☀️ Test successful - checks-actions |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing f6aa851 (parent) -> 4fd3181 (this PR) Test differencesShow 2 test diffs2 doctest diffs were found. These are ignored, as they are noisy. Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 4fd31815524baba0bf368f151f757101f432e3de --output-dir test-dashboard And then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
Finished benchmarking commit (4fd3181): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 0.9%, secondary 5.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 472.758s -> 473.366s (0.13%) |
r? @lcnr
I find that people get confused by what these methods do. The verb "select" is not really that helpful and is just a reference to somewhat of an implementation detail of the trait solvers that doesn't even apply to most obligation kinds.
I went with
try_evaluate_obligations
andevaluate_obligations_error_on_ambiguity
. This maintains consistency with the new solversevalute_goal
entry point. it's unfortunate that we say obligations rather than goals but this maintains consistency withregister_obligation
functions which I think is a good thing. In the long term possibly we renameObligation
orGoal
🤷♀️