rust-lang / rust-lang/rust

Tracking Issue for `u{N}::{wrapping,checked,strict,unbounded}_funnel_{shl,shr}`

Open
#161,798 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-tracking-issue S-tracking-unimplemented T-libs
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Feature gate: #![feature(wrapping_funnel_shifts)]

This is a tracking issue for the wrapping/checked/strict/unbounded funnel shift methods on unsigned integer types.

These extend the previously existing plain and unchecked funnel shift methods (tracked at #145686) to express additional specific overflow semantics.

Public API
impl u{8,16,32,64,128,size} {
    pub const fn wrapping_funnel_shl(self, right: Self, n: u32) -> Self;
    pub const fn wrapping_funnel_shr(self, right: Self, n: u32) -> Self;
    pub const fn checked_funnel_shl(self, right: Self, n: u32) -> Option<Self>;
    pub const fn checked_funnel_shr(self, right: Self, n: u32) -> Option<Self>;
    pub const fn strict_funnel_shl(self, right: Self, n: u32) -> Self;
    pub const fn strict_funnel_shr(self, right: Self, n: u32) -> Self;
    pub const fn unbounded_funnel_shl(self, right: Self, n: u32) -> Self;
    pub const fn unbounded_funnel_shr(self, right: Self, n: u32) -> Self;
}
Steps / History

(Remember to update the S-tracking-* label when checking boxes.)

  • ACP: rust-lang/libs-team#855
  • Implementation: #161119
  • Final comment period (FCP)^1
  • Stabilization PR
Unresolved Questions
  • None yet.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing implementation PR #161119 and the public API listed in this tracking issue, then compare the feature-gate checklist with its current status. Done means the implementation, final comment period, and stabilization steps have been completed.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.