-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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)]`
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)]`
Type
Fields
Give feedbackNo fields configured for issues without a type.
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.