-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
avoid recreating field_const vec #150380
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
avoid recreating field_const vec #150380
Conversation
|
Some changes occurred in cc @BoxyUwU |
|
|
50f69e4 to
73aeea4
Compare
|
@rustbot ready |
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.
In theory we ought to make the same change to the match arms for handling arays/slices/tuples. They're currently doing the same ty::Const::new_value(ct.to_value()) thing which they shouldn't be. I don't think it's possible to write a test case where this matters yet though (we would need mgca to have support for hir::ConstArgKind::Array/Tuple which it doesn't yet).
I feel like a more involved refactor could be nice. Specifically:
- Stop handling
Array/Slice/Tupleindestructure_const - Have all callers of
destructure_consthandle array/slice/tuples themselves by using thebranchesof theValTree. - Rename
destructure_constandty::DestructuredConsttodestructure_adt_constandty::DestructuredAdtConst
Would you be interested in doing that? Can either do so in this PR or a future PR if you like. I'm happy to just merge this PR without the proposed refactoring if you prefer.
sure, I'd be happy to look into this refactor in the follow up PRs |
73aeea4 to
0cb04a1
Compare
tests/ui/const-generics/mgca/printing_valtrees_supports_non_values.rs
Outdated
Show resolved
Hide resolved
tests/ui/const-generics/mgca/printing_valtrees_supports_non_values.rs
Outdated
Show resolved
Hide resolved
tests/ui/const-generics/mgca/printing_valtrees_supports_non_values.rs
Outdated
Show resolved
Hide resolved
tests/ui/const-generics/mgca/printing_valtrees_supports_non_values.rs
Outdated
Show resolved
Hide resolved
0cb04a1 to
f711ba7
Compare
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.
tests/ui/const-generics/mgca/printing_valtrees_supports_non_values.rs
Outdated
Show resolved
Hide resolved
tests/ui/const-generics/mgca/printing_valtrees_supports_non_values.rs
Outdated
Show resolved
Hide resolved
tests/ui/const-generics/mgca/printing_valtrees_supports_non_values.rs
Outdated
Show resolved
Hide resolved
f711ba7 to
517411f
Compare
|
seems like it should be very fine now |
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 once CI passes
|
@bors r=BoxyUwU rollup |
|
☀️ 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 8da80d3 (parent) -> 82dd3cb (this PR) Test differencesShow 4 test diffsStage 1
Stage 2
Additionally, 2 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 82dd3cb008233bfe50ba6b8d6618e6bbd6054eb1 --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 (82dd3cb): 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)Results (primary -6.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 2.8%, secondary 4.7%)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: 483.256s -> 492.292s (1.87%) |
r? BoxyUwU
fixes #150354
fixes #150355