Skip to content
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

Stabilize const {slice,array}::from_mut #130538

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

ultrabear
Copy link
Contributor

This PR stabilizes the following APIs as const stable as of rust 1.83:

// core::array
pub const fn from_mut<T>(s: &mut T) -> &mut [T; 1];

// core::slice
pub const fn from_mut<T>(s: &mut T) -> &mut [T];

This is made possible by const_mut_refs being stabilized (yay).

Tracking issue: #90206

@rustbot
Copy link
Collaborator

rustbot commented Sep 19, 2024

r? @cuviper

rustbot has assigned @cuviper.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 19, 2024
@cuviper
Copy link
Member

cuviper commented Sep 19, 2024

I think this still needs a stabilization FCP.

r? libs-api

@rustbot rustbot added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Sep 19, 2024
@rustbot rustbot assigned dtolnay and unassigned cuviper Sep 19, 2024
@rust-log-analyzer

This comment has been minimized.

@ultrabear
Copy link
Contributor Author

I think this still needs a stabilization FCP.

Yep, this was opened because the original issue already had an FCP for the half of it that got merged, and an FCP cant happen on the same issue twice (informed by Jubilee)

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@ultrabear
Copy link
Contributor Author

force pushed to squash what was 3 commits of failing bootstrap

@ultrabear ultrabear changed the title Stabilize {slice,array}::from_mut Stabilize const {slice,array}::from_mut Sep 19, 2024
@workingjubilee workingjubilee added needs-fcp This change is insta-stable, so needs a completed FCP to proceed. I-libs-api-nominated Nominated for discussion during a libs-api team meeting. and removed T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 19, 2024
@dtolnay
Copy link
Member

dtolnay commented Sep 22, 2024

@rfcbot fcp merge

@rfcbot
Copy link

rfcbot commented Sep 22, 2024

Team member @dtolnay has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Sep 22, 2024
@rfcbot rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Sep 24, 2024
@rfcbot
Copy link

rfcbot commented Sep 24, 2024

🔔 This is now entering its final comment period, as per the review above. 🔔

@Amanieu Amanieu removed the I-libs-api-nominated Nominated for discussion during a libs-api team meeting. label Sep 24, 2024
@rustbot rustbot removed has-merge-commits PR has merge commits, merge with caution. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 9, 2024
@ultrabear
Copy link
Contributor Author

sorry I took so long on this, github stopped sending me emails, maybe they are going to spam now

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-18 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
------
 > importing cache manifest from ghcr.io/rust-lang/rust-ci-cache:20950f2ccee3dff53a038adf5c1cf05231c0b30772617126a5f6478a66316a29cba9aead69f7bb0004886d32c1f8e6287542cf6d25130711c82d16a66201d4fe:
------
##[endgroup]
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-18]
/checkout/src/ci/run.sh: line 58: DISABLE_CI_RUSTC_IF_INCOMPATIBLE: command not found
debug:  configured.
---
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-18', '--enable-llvm-link-shared', '--set', 'rust.randomize-layout=true', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'change-id=99999999', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'rust.lld=false', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-18/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.randomize-layout := True
configure: rust.thin-lto-import-instr-limit := 10
---
  Downloaded boml v0.3.1
   Compiling boml v0.3.1
   Compiling y v0.1.0 (/checkout/compiler/rustc_codegen_gcc/build_system)
    Finished `release` profile [optimized] target(s) in 3.75s
     Running `/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-codegen/x86_64-unknown-linux-gnu/release/y test --use-system-gcc --use-backend gcc --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/cg_gcc --release --mini-tests --std-tests`
Using system GCC
[BUILD] example
[AOT] mini_core_hello_world
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/cg_gcc/mini_core_hello_world
abc
---
##[group]Building stage1 library artifacts (x86_64-unknown-linux-gnu)
##[endgroup]
##[group]Building tool rustdoc (stage0 -> stage1, x86_64-unknown-linux-gnu)
##[endgroup]
thread 'core::builder::tests::ci_rustc_if_unchanged_logic' panicked at src/core/builder/tests.rs:260:5:
assertion failed: has_changes == config.download_rustc_commit.is_none()


failures:
    core::builder::tests::ci_rustc_if_unchanged_logic

@workingjubilee
Copy link
Member

That CI job is busted. This can go in.

@bors r+

@bors
Copy link
Contributor

bors commented Oct 9, 2024

📌 Commit 461b49d has been approved by workingjubilee

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 9, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 9, 2024
…r=workingjubilee

Stabilize const `{slice,array}::from_mut`

This PR stabilizes the following APIs as const stable as of rust `1.83`:
```rs
// core::array
pub const fn from_mut<T>(s: &mut T) -> &mut [T; 1];

// core::slice
pub const fn from_mut<T>(s: &mut T) -> &mut [T];
```
This is made possible by `const_mut_refs` being stabilized (yay).

Tracking issue: rust-lang#90206
@bors
Copy link
Contributor

bors commented Oct 9, 2024

⌛ Testing commit 461b49d with merge 4ba32c6...

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-19 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
##[group]Building stage1 library artifacts (x86_64-unknown-linux-gnu)
##[endgroup]
##[group]Building tool rustdoc (stage0 -> stage1, x86_64-unknown-linux-gnu)
##[endgroup]
thread 'core::builder::tests::ci_rustc_if_unchanged_logic' panicked at src/core/builder/tests.rs:260:5:
assertion failed: has_changes == config.download_rustc_commit.is_none()
   0: rust_begin_unwind
             at /rustc/8c27a2ba6b21f3406a51118643080f0591949827/library/std/src/panicking.rs:662:5
   1: core::panicking::panic_fmt
             at /rustc/8c27a2ba6b21f3406a51118643080f0591949827/library/core/src/panicking.rs:74:14

@bors
Copy link
Contributor

bors commented Oct 9, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 9, 2024
@workingjubilee
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Oct 10, 2024

💡 This pull request was already approved, no need to approve it again.

  • This pull request previously failed. You should add more commits to fix the bug, or use retry to trigger a build again.
  • There's another pull request that is currently being tested, blocking this pull request: Clippy: Backport needless_return fix #131492

@bors
Copy link
Contributor

bors commented Oct 10, 2024

📌 Commit 461b49d has been approved by workingjubilee

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 10, 2024
@workingjubilee
Copy link
Member

@bors retry

workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Oct 10, 2024
…, r=workingjubilee

Stabilize const `{slice,array}::from_mut`

This PR stabilizes the following APIs as const stable as of rust `1.83`:
```rs
// core::array
pub const fn from_mut<T>(s: &mut T) -> &mut [T; 1];

// core::slice
pub const fn from_mut<T>(s: &mut T) -> &mut [T];
```
This is made possible by `const_mut_refs` being stabilized (yay).

Tracking issue: rust-lang#90206
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 10, 2024
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#130308 (codegen_ssa: consolidate tied target checks)
 - rust-lang#130538 (Stabilize const `{slice,array}::from_mut`)
 - rust-lang#130741 (rustc_target: Add sme-b16b16 as an explicit aarch64 target feature)
 - rust-lang#131033 (Precise capturing in traits)
 - rust-lang#131442 (Match std `RUSTFLAGS` for host and target for `mir-opt` test suite to fix double std build/rebuilds)
 - rust-lang#131470 (add test infra to explicitely test rustc with autodiff/enzyme disabled)
 - rust-lang#131475 (Compiler & its UI tests: Rename remaining occurrences of "object safe" to "dyn compatible" )
 - rust-lang#131493 (Avoid redundant sysroot additions to `PATH` when linking)
 - rust-lang#131509 (Update .mailmap)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 9237937 into rust-lang:master Oct 10, 2024
11 of 13 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Oct 10, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Oct 10, 2024
Rollup merge of rust-lang#130538 - ultrabear:ultrabear_const_from_ref, r=workingjubilee

Stabilize const `{slice,array}::from_mut`

This PR stabilizes the following APIs as const stable as of rust `1.83`:
```rs
// core::array
pub const fn from_mut<T>(s: &mut T) -> &mut [T; 1];

// core::slice
pub const fn from_mut<T>(s: &mut T) -> &mut [T];
```
This is made possible by `const_mut_refs` being stabilized (yay).

Tracking issue: rust-lang#90206
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. needs-fcp This change is insta-stable, so needs a completed FCP to proceed. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. to-announce Announce this issue on triage meeting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants