Skip to content

Checked/wrapping/unbounded funnel shifts - #161119

Open
pthariensflame wants to merge 1 commit into
rust-lang:mainfrom
pthariensflame:wrapping-funnel-shifts
Open

Checked/wrapping/unbounded funnel shifts#161119
pthariensflame wants to merge 1 commit into
rust-lang:mainfrom
pthariensflame:wrapping-funnel-shifts

Conversation

@pthariensflame

@pthariensflame pthariensflame commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

This implements the wrapping funnel shifts requested at rust-lang/libs-team#642 (comment) and also some additional forms of funnel shift proposed at rust-lang/libs-team#855; this might interact with #161015, which is attempting to stabilize the original funnel shift methods.

The work in this PR was done entirely by some people inside a human brain, without the use of any LLMs…or much use of an IDE since ours kept crashing during this process and we had to resort to a plain text editor. 😅

@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 Aug 15, 2026
@rustbot

rustbot commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator

r? @JohnTitor

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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: libs
  • libs expanded to 12 candidates
  • Random selection from JohnTitor, Mark-Simulacrum, clarfonthey, nia-e, tgross35

@tgross35 tgross35 added the S-waiting-on-ACP Status: PR has an ACP and is waiting for the ACP to complete. label Aug 15, 2026
@tgross35

Copy link
Copy Markdown
Member

ACP at rust-lang/libs-team#855

/// This function will return `None` if `n` is greater than or equal to the number of
/// bits in `self`, i.e. when [`funnel_shl`](Self::funnel_shl) would panic.
#[rustc_const_unstable(feature = "wrapping_funnel_shifts", issue = "none")]
#[unstable(feature = "wrapping_funnel_shifts", issue = "none")]

@tgross35 tgross35 Aug 20, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please create a new tracking issue. I think it's fine to do even before the ACP is accepted

View changes since the review

@pthariensflame pthariensflame Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We will update this PR when we are next back at our computer on Monday for other reasons anyway (adding strict versions, adding tests), so we will make a tracking issue and list it then too.

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. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants