Skip to content

Implement compile time function evaluation (CTFE) #11621

Description

@brendanzab

This is a big gap in Rust's current support of zero cost abstractions, and something that puts us behind languages such as D or C++. This would for example allow us to deprecate the std::uint::{bits, bytes} statics in favor of using the std::mem::size_of function. It would also allow for the use of overloaded operators in constexprs, which would in turn allow us implement the base numeric arithmetic operators within the standard library, as opposed to relying on compiler magic (see #11526).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.I-compiletimeIssue: Problems and improvements with respect to compile times.P-lowLow priority

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions