-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Various coercion cleanups #139582
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
Various coercion cleanups #139582
Conversation
r? @fee1-dead rustbot has assigned @fee1-dead. Use |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Various coercion cleanups I think the commit order is the most reasonable one, but there's probably more ways to get to the same goal. Essentially I got rid of the `simple` and `identity` helpers by adding a dedicated function for the common `identity` case and getting rid of the callbacks alltogether by realizing that all callbacks were of the pattern "use this fixed prefix list of adjustments, then add another adjustment with the unified type as the target type". No behavioral changes intended
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
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.
LGTM. r=me when perf.
Finished benchmarking commit (40110c0): comparison URL. Overall result: ❌ regressions - please read the text belowBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (primary 6.2%, secondary 1.0%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (secondary 0.0%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 779.721s -> 779.516s (-0.03%) |
The extra heap allocation caused by @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Various coercion cleanups I think the commit order is the most reasonable one, but there's probably more ways to get to the same goal. Essentially I got rid of the `simple` and `identity` helpers by adding a dedicated function for the common `identity` case and getting rid of the callbacks alltogether by realizing that all callbacks were of the pattern "use this fixed prefix list of adjustments, then add another adjustment with the unified type as the target type". No behavioral changes intended
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (269623e): comparison URL. Overall result: no relevant changes - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (secondary -2.4%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (secondary 1.3%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 780.636s -> 780.068s (-0.07%) |
@bors r=compiler-errors rollup (diff to reviewed code is using arrays and APIT |
@bors r+ |
…ler-errors Various coercion cleanups I think the commit order is the most reasonable one, but there's probably more ways to get to the same goal. Essentially I got rid of the `simple` and `identity` helpers by adding a dedicated function for the common `identity` case and getting rid of the callbacks alltogether by realizing that all callbacks were of the pattern "use this fixed prefix list of adjustments, then add another adjustment with the unified type as the target type". No behavioral changes intended
…ler-errors Various coercion cleanups I think the commit order is the most reasonable one, but there's probably more ways to get to the same goal. Essentially I got rid of the `simple` and `identity` helpers by adding a dedicated function for the common `identity` case and getting rid of the callbacks alltogether by realizing that all callbacks were of the pattern "use this fixed prefix list of adjustments, then add another adjustment with the unified type as the target type". No behavioral changes intended
…enton Rollup of 12 pull requests Successful merges: - rust-lang#138744 (Add methods to TCP and UDP sockets to modify hop limit (refresh of rust-lang#94678)) - rust-lang#138962 (Expect an array when expected and acutal types are both arrays during cast) - rust-lang#139001 (add `naked_functions_rustic_abi` feature gate) - rust-lang#139379 (Use delayed bug for normalization errors in drop elaboration) - rust-lang#139582 (Various coercion cleanups) - rust-lang#139628 (Suggest remove redundant `$()?` around `vis`) - rust-lang#139644 (Micro-optimize `InstSimplify`'s `simplify_primitive_clone`) - rust-lang#139666 (cleanup `mir_borrowck`) - rust-lang#139674 (In `rustc_mir_transform`, iterate over index newtypes instead of ints) - rust-lang#139695 (compiletest: consistently use `camino::{Utf8Path,Utf8PathBuf}` throughout) - rust-lang#139722 (Move some things to rustc_type_ir) - rust-lang#139740 (Convert `tests/ui/lint/dead-code/self-assign.rs` to a known-bug test) r? `@ghost` `@rustbot` modify labels: rollup
…ler-errors Various coercion cleanups I think the commit order is the most reasonable one, but there's probably more ways to get to the same goal. Essentially I got rid of the `simple` and `identity` helpers by adding a dedicated function for the common `identity` case and getting rid of the callbacks alltogether by realizing that all callbacks were of the pattern "use this fixed prefix list of adjustments, then add another adjustment with the unified type as the target type". No behavioral changes intended
Rollup of 11 pull requests Successful merges: - rust-lang#137043 (Initial `UnsafePinned` implementation [Part 1: Libs]) - rust-lang#138962 (Expect an array when expected and acutal types are both arrays during cast) - rust-lang#139001 (add `naked_functions_rustic_abi` feature gate) - rust-lang#139379 (Use delayed bug for normalization errors in drop elaboration) - rust-lang#139582 (Various coercion cleanups) - rust-lang#139628 (Suggest remove redundant `$()?` around `vis`) - rust-lang#139644 (Micro-optimize `InstSimplify`'s `simplify_primitive_clone`) - rust-lang#139671 (Proc macro span API redesign: Replace proc_macro::SourceFile by Span::{file, local_file}) - rust-lang#139674 (In `rustc_mir_transform`, iterate over index newtypes instead of ints) - rust-lang#139740 (Convert `tests/ui/lint/dead-code/self-assign.rs` to a known-bug test) - rust-lang#139741 (fix smir's run! doc and import) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 10 pull requests Successful merges: - rust-lang#137043 (Initial `UnsafePinned` implementation [Part 1: Libs]) - rust-lang#138962 (Expect an array when expected and acutal types are both arrays during cast) - rust-lang#139001 (add `naked_functions_rustic_abi` feature gate) - rust-lang#139379 (Use delayed bug for normalization errors in drop elaboration) - rust-lang#139582 (Various coercion cleanups) - rust-lang#139628 (Suggest remove redundant `$()?` around `vis`) - rust-lang#139644 (Micro-optimize `InstSimplify`'s `simplify_primitive_clone`) - rust-lang#139674 (In `rustc_mir_transform`, iterate over index newtypes instead of ints) - rust-lang#139740 (Convert `tests/ui/lint/dead-code/self-assign.rs` to a known-bug test) - rust-lang#139741 (fix smir's run! doc and import) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#139582 - oli-obk:coercion-cleanups, r=compiler-errors Various coercion cleanups I think the commit order is the most reasonable one, but there's probably more ways to get to the same goal. Essentially I got rid of the `simple` and `identity` helpers by adding a dedicated function for the common `identity` case and getting rid of the callbacks alltogether by realizing that all callbacks were of the pattern "use this fixed prefix list of adjustments, then add another adjustment with the unified type as the target type". No behavioral changes intended
I think the commit order is the most reasonable one, but there's probably more ways to get to the same goal.
Essentially I got rid of the
simple
andidentity
helpers by adding a dedicated function for the commonidentity
case and getting rid of the callbacks alltogether by realizing that all callbacks were of the pattern "use this fixed prefix list of adjustments, then add another adjustment with the unified type as the target type".No behavioral changes intended