Uh oh!
There was an error while loading. Please reload this page.
Enforce type of const param correctly in MIR typeck - #138283
Conversation
compiler-errors
commented
Mar 9, 2025
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
… r=<try> Enforce type of const param correctly in MIR typeck Properly intercepts and then annotates the type for a `ConstKind::Param` in the MIR. This code should probably be cleaned up, it's kinda spaghetti, but no better structure really occurred to me when writing this case. We could probably gate this behind the feature gate or add a fast path when the args have no free regions if perf is bad. r? `@BoxyUwU`
bors
commented
Mar 9, 2025
This comment has been minimized.
This comment has been minimized.
compiler-errors
commented
Mar 9, 2025
Forgor the stderr test, will push when try build is done. |
bors
commented
Mar 9, 2025
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
c745d61 to
9926d69Compare
This comment has been minimized.
This comment has been minimized.
9926d69 to
a026bdbComparerust-timer
commented
Mar 10, 2025
Finished benchmarking commit (f102e38): 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)This benchmark run did not return any relevant results for this metric. CyclesResults (primary 2.2%)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: 769.881s -> 768.249s (-0.21%) |
BoxyUwU
commented
Mar 11, 2025
Can you add a test case that doesn't rely on #![feature(adt_const_params, unsized_const_params)]use std::marker::ConstParamTy_;traitTrait<'a>{typeAssoc:ConstParamTy_;}fnfoo<'a,constN: <u8asTrait<'static>>::Assoc>()wherefor<'b>u8:Trait<'b>{// Should error but doesn't on nightlylet _: <u8asTrait<'a>>::Assoc = N;}I don't think you can do it without |
a026bdb to
b9c77efComparecompiler-errors
commented
Mar 11, 2025
Added a test with a fun trick to create a type that has invariant lifetimes but also is @rustbot ready |
b9c77ef to
2097cdaCompareBoxyUwU
commented
Mar 11, 2025
thx gamer, r=me if/when CI passes |
compiler-errors
commented
Mar 11, 2025
bors
commented
Mar 13, 2025
☔ The latest upstream changes (presumably #138416) made this pull request unmergeable. Please resolve the merge conflicts. |
2097cda to
c3c5b92Compare
This comment has been minimized.
This comment has been minimized.
c3c5b92 to
0160c60Comparecompiler-errors
commented
Mar 15, 2025
@bors r=BoxyUwU rollup |
bors
commented
Mar 15, 2025
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#138283 (Enforce type of const param correctly in MIR typeck) - rust-lang#138439 (feat: check ARG_MAX on Unix platforms) - rust-lang#138502 (resolve: Avoid some unstable iteration) - rust-lang#138514 (Remove fake borrows of refs that are converted into non-refs in `MakeByMoveBody`) - rust-lang#138524 (Mark myself as unavailable for reviews temporarily) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#138283 - compiler-errors:enforce-const-param, r=BoxyUwU Enforce type of const param correctly in MIR typeck Properly intercepts and then annotates the type for a `ConstKind::Param` in the MIR. This code should probably be cleaned up, it's kinda spaghetti, but no better structure really occurred to me when writing this case. We could probably gate this behind the feature gate or add a fast path when the args have no free regions if perf is bad. r? `@BoxyUwU`
Properly intercepts and then annotates the type for a
ConstKind::Paramin the MIR.This code should probably be cleaned up, it's kinda spaghetti, but no better structure really occurred to me when writing this case.
We could probably gate this behind the feature gate or add a fast path when the args have no free regions if perf is bad.
r? @BoxyUwU