Skip to content

std_detect: Tidying of slice length #1838

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

Merged

Conversation

a4lg
Copy link
Contributor

@a4lg a4lg commented Jun 29, 2025

It's nothing more than a small tidying.
But since stdarch moved on to a Josh subtree, we (stdarch contributors) can ask whether pure stdarch changes are still accepted through this repo.

We don't need to put the length of the riscv_hwprobe array into a variable.
This commit removes that variable and gives the length of the output slice to the __riscv_hwprobe directly.

@rustbot
Copy link
Collaborator

rustbot commented Jun 29, 2025

r? @Amanieu

rustbot has assigned @Amanieu.
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

@a4lg
Copy link
Contributor Author

a4lg commented Jun 29, 2025

Hmm, CI is failing with a reason unrelated to this change itself.

@folkertdev
Copy link
Contributor

Generally, changes should still be made here if possible. Certainly right now (CI doesn't run in the rust-lang/rust repo), but this has been the policy for e.g. miri which has been a subtree for a while.

I have a possible fix for the issue here rust-lang/rust#143194, but that'll take at least a day to propagate to nightly and fix CI here. (that is of course one of the reasons to make stdarch a subtree: no more such breakage).

We don't need to put the length of the `riscv_hwprobe` array into a
variable.  This commit removes that variable and gives the length
of the output slice to the `__riscv_hwprobe` directly.
@a4lg a4lg force-pushed the riscv-linux-hwprobe-tidying-20250629 branch from a23fcf3 to 3c17d86 Compare July 3, 2025 03:17
@a4lg
Copy link
Contributor Author

a4lg commented Jul 3, 2025

@folkertdev Thanks for letting me know (both about future contribution and current CI failures).
Now, it seems stdarch CI is working as nightly-2025-07-03 contains the fix you mentioned.

@Amanieu Amanieu added this pull request to the merge queue Jul 3, 2025
Merged via the queue into rust-lang:master with commit fdb4b91 Jul 3, 2025
61 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants