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

Kill array_assume_init #103134

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SUPERCILEX
Copy link
Contributor

No longer needed with transpose.

r? @scottmcm

@rustbot rustbot added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Oct 17, 2022
@rustbot
Copy link
Collaborator

rustbot commented Oct 17, 2022

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 17, 2022
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@SUPERCILEX
Copy link
Contributor Author

I don't see hashbrown in the rust source: do I have to fix this by patching hashbrown, waiting for them to release, and then pulling in that new version into rust?

@@ -161,22 +161,6 @@ fn assume_init_good() {
assert!(TRUE);
}

#[test]
fn uninit_array_assume_init() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an equivalent test for transpose already?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe? There are doc tests, but again transpose is NOT assume_init so I'm not sure what we'd be testing (that transmute works?).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'd be testing that this same behavior still works with the new methods, which sounds useful to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, added back.

#[rustc_const_unstable(feature = "const_maybe_uninit_array_assume_init", issue = "96097")]
#[inline(always)]
#[track_caller]
pub const unsafe fn array_assume_init<const N: usize>(array: [Self; N]) -> [T; N] {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like I've mentioned in some other PRs, I'm not willing to take an API removal (even an unstable one) without libs-api team oversight.

Up to you if you want to bring this up in an ACP to see if T-libs-api agrees, or if you want to make this just a T-libs change that updates the implementations of things to use transpose without actually removing things.

@rustbot author

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, I want to get rid of these. Created rust-lang/libs-team#122

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, this is probably what you were trying to tell me but I think it'll be easier to split stdlib usage removal from api removal, so I'll pull out the usage removals.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, it's always easiest to split things up by decision makers.

Such as, where possible:

  • changes to compiler separate from library
  • additions separate from removals
  • internal details separate from anything impacting callers

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha yeah, thanks. I feel like I've learned this lesson at least a dozen times by now, but the initial ease of piling a bunch of crap together is too good a fool. :)

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 17, 2022
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)

JohnTitor added a commit to JohnTitor/rust that referenced this pull request Oct 18, 2022
…=scottmcm

Remove all uses of array_assume_init

See rust-lang#103134 (comment)

r? `@scottmcm`
@Dylan-DPC Dylan-DPC added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 13, 2022
@scottmcm
Copy link
Member

Waiting on ACP in rust-lang/libs-team#122 -- libs-api indicated that transpose isn't their preferred direction, which might well affect this.

@scottmcm scottmcm added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. S-waiting-on-ACP Status: PR has an ACP and is waiting for the ACP to complete. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 14, 2023
thomcc pushed a commit to tcdi/postgrestd that referenced this pull request Feb 10, 2023
@bors
Copy link
Contributor

bors commented Feb 13, 2023

☔ The latest upstream changes (presumably #107634) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Feb 13, 2023
@JohnCSimon JohnCSimon added S-waiting-on-ACP Status: PR has an ACP and is waiting for the ACP to complete. and removed S-waiting-on-ACP Status: PR has an ACP and is waiting for the ACP to complete. labels Apr 30, 2023
@Dylan-DPC Dylan-DPC removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-ACP Status: PR has an ACP and is waiting for the ACP to complete. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants