-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Rollup of 2 pull requests #150503
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
Rollup of 2 pull requests #150503
Conversation
`freshen_{ty,const}` take a `Result` and just do a fold if the input is
`Ok`. It's simpler to do those folds at the call site, and only call
`freshen_{ty,const}` in the `Err` case. That way we can also avoid
useless fold operations on the results of `new_{int,uint,float}`.
Also, make some `bug!` calls more concise.
I have always found this confusingly named, because it creates a new freshener rather than returning an existing one. We can remove it and just use `TypeFreshener::new()` at the two call sites, avoiding this confusion.
Sometimes we freshen using a new `TypeFreshener`, and sometimes we freshen with an existing `TypeFreshener`. For the former we have the method `InferCtxt::freshen`. For the latter we just call `fold_with`. This asymmetry has been confusing to me. This commit removes `InferCtxt::freshen` so that all the freshening sites consistently use `fold_with` and it's obvious if each one is using a new or existing `TypeFreshener`.
Because `fresh_trait_pred` is the name of the field/argument. The `_ref` suffix appears to be a typo, or left over from earlier versions of the code.
It never happens in practice.
It's no longer needed.
…-methods, r=lcnr
Simplify `TypeFreshener` methods.
`freshen_{ty,const}` take a `Result` and just do a fold if the input is `Ok`. It's simpler to do those folds at the call site, and only call `freshen_{ty,const}` in the `Err` case. That way we can also avoid useless fold operations on the results of `new_{int,uint,float}`.
Also, make some `bug!` calls more concise.
r? `@lcnr`
Cleanup linked list - Replaces some checked_sub().unwrap_or(0) with saturating_sub(). - Replaces NonNull::from(Box::leak(node)) with Box::into_non_null(node)
|
@bors r+ rollup=never p=5 |
|
☀️ Test successful - checks-actions |
|
📌 Perf builds for each rolled up PR:
previous master: d465f99043 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
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 d465f99 (parent) -> 15f7c55 (this PR) Test differencesShow 34 test diffs34 doctest diffs were found. These are ignored, as they are noisy. Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 15f7c553a377bd027a0e2061695766c35c8600d1 --output-dir test-dashboardAnd 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 (15f7c55): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResults (primary 2.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 482.641s -> 482.495s (-0.03%) |
Successful merges:
TypeFreshenermethods. #150239 (SimplifyTypeFreshenermethods.)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup