Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
9370440
stabilize `const_array_each_ref`
fee1-dead Jul 3, 2025
f4b3415
[Doc] Add links to the various collections
QnJ1c2kNCg Jul 31, 2025
8adc296
allow using `target_val!` with a rename
WaffleLapkin Jul 25, 2025
be42f3f
turn pointer width into an integer in target.json
WaffleLapkin Jul 25, 2025
6caa8ff
accept integer `target-pointer-width` in compiletest
WaffleLapkin Jul 25, 2025
51134eb
fix target-pointer-width in tests
WaffleLapkin Jul 31, 2025
ee7627e
std_detect: RISC-V: implement implication to "C"
a4lg Aug 19, 2025
76ba208
Add an experimental unsafe(force_target_feature) attribute.
veluca93 Aug 18, 2025
6a088fd
Defer tail call ret ty equality to check_tail_calls
compiler-errors Aug 19, 2025
5a451b8
Add new `--test-codegen-backend` bootstrap option
GuillaumeGomez Aug 11, 2025
e4cdc0f
Split compiletest `--codegen-backend` into two options `--default-cod…
GuillaumeGomez Aug 18, 2025
27e6726
Do not use effective_visibilities query for Adt types of a local trai…
xizheyin Aug 20, 2025
29f0d8b
Download CI GCC into the correct directory
Kobzol Aug 20, 2025
e1045c2
Fix JS search scripts path
GuillaumeGomez Aug 20, 2025
2da0ec3
Enforce correct number of arguments for `"x86-interrupt"` functions
GrigorenkoPV Aug 20, 2025
992c025
Enable triagebot `[review-changes-since]` feature
Urgau Aug 20, 2025
620fa4a
Rollup merge of #143383 - fee1-dead-contrib:push-mstmlwuskxyy, r=dtolnay
jhpratt Aug 20, 2025
b949df9
Rollup merge of #144443 - WaffleLapkin:integer-target-pointer-width, …
jhpratt Aug 20, 2025
e916ed7
Rollup merge of #144758 - QnJ1c2kNCg:master, r=Noratrieb
jhpratt Aug 20, 2025
820ad6f
Rollup merge of #144915 - compiler-errors:tail-call-ret-ty-equality, …
jhpratt Aug 20, 2025
044e5ef
Rollup merge of #145256 - GuillaumeGomez:bootstrap-test-codegen-backe…
jhpratt Aug 20, 2025
6a0539a
Rollup merge of #145415 - a4lg:riscv-implication-to-c, r=Amanieu
jhpratt Aug 20, 2025
b404ed5
Rollup merge of #145573 - veluca93:unsafe-force-target-feature, r=dav…
jhpratt Aug 20, 2025
0d54f47
Rollup merge of #145642 - xizheyin:145611, r=lcnr
jhpratt Aug 20, 2025
be5ee77
Rollup merge of #145650 - GuillaumeGomez:fix-js-search-scripts-path, …
jhpratt Aug 20, 2025
c64a2ef
Rollup merge of #145654 - Kobzol:gcc-ci-root, r=jieyouxu
jhpratt Aug 20, 2025
043d078
Rollup merge of #145662 - GrigorenkoPV:x86-interrupt, r=compiler-errors
jhpratt Aug 20, 2025
68247ae
Rollup merge of #145674 - Urgau:triagebot-review-changes-since, r=Kobzol
jhpratt Aug 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
stabilize const_array_each_ref
  • Loading branch information
fee1-dead committed Jul 3, 2025
commit 937044097b8fc23b387ab58fc233109551e8536f
8 changes: 4 additions & 4 deletions library/core/src/array/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -618,11 +618,11 @@ impl<T, const N: usize> [T; N] {
/// assert_eq!(strings.len(), 3);
/// ```
#[stable(feature = "array_methods", since = "1.77.0")]
#[rustc_const_unstable(feature = "const_array_each_ref", issue = "133289")]
#[rustc_const_stable(feature = "const_array_each_ref", since = "CURRENT_RUSTC_VERSION")]
pub const fn each_ref(&self) -> [&T; N] {
let mut buf = [null::<T>(); N];

// FIXME(const-hack): We would like to simply use iterators for this (as in the original implementation), but this is not allowed in constant expressions.
// FIXME(const_trait_impl): We would like to simply use iterators for this (as in the original implementation), but this is not allowed in constant expressions.
let mut i = 0;
while i < N {
buf[i] = &raw const self[i];
Expand All @@ -649,11 +649,11 @@ impl<T, const N: usize> [T; N] {
/// assert_eq!(floats, [0.0, 2.7, -1.0]);
/// ```
#[stable(feature = "array_methods", since = "1.77.0")]
#[rustc_const_unstable(feature = "const_array_each_ref", issue = "133289")]
#[rustc_const_stable(feature = "const_array_each_ref", since = "CURRENT_RUSTC_VERSION")]
pub const fn each_mut(&mut self) -> [&mut T; N] {
let mut buf = [null_mut::<T>(); N];

// FIXME(const-hack): We would like to simply use iterators for this (as in the original implementation), but this is not allowed in constant expressions.
// FIXME(const_trait_impl): We would like to simply use iterators for this (as in the original implementation), but this is not allowed in constant expressions.
let mut i = 0;
while i < N {
buf[i] = &raw mut self[i];
Expand Down
Loading