Skip to content

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

Description

@pthariensflame

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

Unresolved Questions

  • None yet.

Footnotes

  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCS-tracking-unimplementedStatus: The feature has not been implemented.T-libsRelevant to the library team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions