Tracking Issue for num_midpoint · Issue #110840 · rust-lang/rust (original) (raw)

Feature gate: #[feature(num_midpoint)], #[feature(num_midpoint_signed)] and #![feature(const_num_midpoint)]

This is a tracking issue for the midpoint function to {u,i}{8,16,32,64,128,size}, NonZeroU{8,16,32,64,size} and f{32,64}.

The midpoint function calculates the middle point of lhs and rhs.

Public API

impl {u,i}{8,16,32,64,128,size} { pub const fn midpoint(self, rhs: Self) -> Self; }

impl NonZeroU{8,16,32,64,size} { pub const fn midpoint(self, rhs: Self) -> Self; }

impl f{32,64} { pub const fn midpoint(self, rhs: Self) -> Self; }

Steps / History

Unresolved Questions

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