-
-
Notifications
You must be signed in to change notification settings - Fork 16.2k
const fn in Trait implementation. #71971
Copy link
Copy link
Closed
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)F-const_trait_impl`#![feature(const_trait_impl)]``#![feature(const_trait_impl)]`
Description
Activity
Metadata
Metadata
Assignees
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)F-const_trait_impl`#![feature(const_trait_impl)]``#![feature(const_trait_impl)]`
For code like this:
This currently emits:
It would be extremely useful if we could have const fn in trait implementation (especially for operator overloading). And I saw this is also mentioned in the RFC 0911.