Skip to content

Tracking Issue for const_array_as_mut_slice #133333

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
2 of 3 tasks
bjoernager opened this issue Nov 22, 2024 · 5 comments
Open
2 of 3 tasks

Tracking Issue for const_array_as_mut_slice #133333

bjoernager opened this issue Nov 22, 2024 · 5 comments
Labels
C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@bjoernager
Copy link
Contributor

bjoernager commented Nov 22, 2024

Add the const specifier to <[T; N]>::as_mut_slice.

Public API

impl<T, const N: usize> {
    pub const fn as_mut_slice(&mut self) -> &mut [T];
}

Steps / History

Unresolved Questions

  • None yet.
@bjoernager bjoernager added C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Nov 22, 2024
@jhpratt
Copy link
Member

jhpratt commented Nov 22, 2024

I've r+'ed the unstable implementation. Given that this is as trivial as it gets, I think it makes sense for this to be stabilized without any further consideration. cc @rust-lang/libs-api for possible FCP

@bjoernager
Copy link
Contributor Author

I'll get around to the stabilisation PR, then. :)

@jhpratt
Copy link
Member

jhpratt commented Nov 22, 2024

Up to you, as a stabilization PR is of course simple. I would be surprised if the team didn't want to stabilize it, but it's also not up to me.

@bjoernager
Copy link
Contributor Author

Sure. If anything, it can just sit idle until the (I'm assuming inevitable) FCP has passed – or whatever else happens.

compiler-errors added a commit to compiler-errors/rust that referenced this issue Nov 23, 2024
…e, r=jhpratt

Mark `<[T; N]>::as_mut_slice` with the `const` specifier.

Tracking issue: rust-lang#133333

`<[T; N]>::as_mut_slice` can have the `const` specifier without any changes to the function body.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Nov 23, 2024
…e, r=jhpratt

Mark `<[T; N]>::as_mut_slice` with the `const` specifier.

Tracking issue: rust-lang#133333

`<[T; N]>::as_mut_slice` can have the `const` specifier without any changes to the function body.
jieyouxu added a commit to jieyouxu/rust that referenced this issue Nov 23, 2024
…e, r=jhpratt

Mark `<[T; N]>::as_mut_slice` with the `const` specifier.

Tracking issue: rust-lang#133333

`<[T; N]>::as_mut_slice` can have the `const` specifier without any changes to the function body.
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Nov 23, 2024
Rollup merge of rust-lang#133332 - bjoernager:const-array-as-mut-slice, r=jhpratt

Mark `<[T; N]>::as_mut_slice` with the `const` specifier.

Tracking issue: rust-lang#133333

`<[T; N]>::as_mut_slice` can have the `const` specifier without any changes to the function body.
@thaliaarchi
Copy link
Contributor

I've opened a PR to stabilize this: #140066.

We'll need to start an FCP.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants