-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
mGCA: Support array expression as direct const arguments #150786
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
Conversation
This comment has been minimized.
This comment has been minimized.
71bf175 to
059e616
Compare
This comment has been minimized.
This comment has been minimized.
|
☔ The latest upstream changes (presumably #150798) made this pull request unmergeable. Please resolve the merge conflicts. |
| let tcx = self.tcx(); | ||
|
|
||
| let array_len = array_expr.elems.len() as u64; | ||
| let elem_ty = self.ty_infer(None, array_expr.span); |
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.
using a ty_infer here isn't quite what you want, this will make it so that using array expressions in type signatures will cause an error due to having _ in your type signature.
it might be useful to look at the recent PR adding support for (N, N2, const { 1 + 1 }) to mgca which has to do very similar logic to what you need to do here: https://github.com/rust-lang/rust/pull/150675/files#diff-ce4273e1e949bf3052de7a08466c4dad785890b24091122954541b615b0ba199R2488-R2513
(you'll probably need to rebase onto latest main too to get the FeedConstTy changes :3)
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.
Thanks for the review! I changed the type infer to use a different method than ty_infer and added related tests.
|
Looks good so far :) thanks for taking this on |
9fdd556 to
21e092f
Compare
ecca57d to
49b8c2b
Compare
|
HIR ty lowering was modified cc @fmease Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
|
thanks! @bors r+ rollup |
mGCA: Support array expression as direct const arguments tracking issue: rust-lang#132980 resolve: rust-lang#150612 Support array expression as direct const arguments (e. g. [1, 2, N]) in min_generic_const_args. todo: * [x] Rebase another mGCA PR * [x] Add more test case * [x] Modify clippy code
|
☔ The latest upstream changes (presumably #150818) made this pull request unmergeable. Please resolve the merge conflicts. This pull request was unapproved. |
mGCA: Support array expression as direct const arguments tracking issue: rust-lang#132980 resolve: rust-lang#150612 Support array expression as direct const arguments (e. g. [1, 2, N]) in min_generic_const_args. todo: * [x] Rebase another mGCA PR * [x] Add more test case * [x] Modify clippy code
mGCA: Support array expression as direct const arguments tracking issue: rust-lang#132980 resolve: rust-lang#150612 Support array expression as direct const arguments (e. g. [1, 2, N]) in min_generic_const_args. todo: * [x] Rebase another mGCA PR * [x] Add more test case * [x] Modify clippy code
mGCA: Support array expression as direct const arguments tracking issue: rust-lang#132980 resolve: rust-lang#150612 Support array expression as direct const arguments (e. g. [1, 2, N]) in min_generic_const_args. todo: * [x] Rebase another mGCA PR * [x] Add more test case * [x] Modify clippy code
mGCA: Support array expression as direct const arguments tracking issue: rust-lang#132980 resolve: rust-lang#150612 Support array expression as direct const arguments (e. g. [1, 2, N]) in min_generic_const_args. todo: * [x] Rebase another mGCA PR * [x] Add more test case * [x] Modify clippy code
Rollup of 14 pull requests Successful merges: - #148941 (stabilize `Peekable::next_if_map` (`#![feature(peekable_next_if_map)]`)) - #150368 (adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file) - #150668 (Unix implementation for stdio set/take/replace) - #150743 (Reword the collect() docs) - #150776 (Fix the connect_error test on FreeBSD 15+) - #150781 (Use `rand` crate more idiomatically) - #150786 (mGCA: Support array expression as direct const arguments) - #150812 (Bump `diesel` to the most recent commit in `cargotest`) - #150862 (std: sys: fs: uefi: Implement File::flush) - #150873 (Reenable GCC CI download) - #150908 (llvm: Update `reliable_f16` configuration for LLVM22) - #150918 (std: sys: fs: uefi: Implement File::seek) - #150922 (Subscribe myself to attr parsing) - #150930 (Remove special case for `AllowedTargets::CrateLevel`) r? @ghost
|
@bors r- |
|
Commit f2f45ff has been unapproved. |
|
Though note that the same job previously succeeded in #150948 (comment), so it might be flaky. @bors try jobs=x86_64-mingw-1 |
mGCA: Support array expression as direct const arguments try-job: x86_64-mingw-1
This comment has been minimized.
This comment has been minimized.
|
I don't see anything in this PR that could cause that test to fail 🤔 Going to re-approve this PR, if that test is flakily failing (which it seems so) we should probably disable it so it stops causing rollups to fail. @bors r+ |
|
though |
This comment has been minimized.
This comment has been minimized.
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 b115ea2 (parent) -> 1377169 (this PR) Test differencesShow 38 test diffsStage 1
Stage 2
Additionally, 24 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 137716908d561bfcf0341701ec13a28326926c82 --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 (1377169): 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 (secondary 3.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: 473.644s -> 473.493s (-0.03%) |
tracking issue: #132980
resolve: #150612
Support array expression as direct const arguments (e. g. [1, 2, N]) in min_generic_const_args.
todo: