Closed JohnBobbo96 closed 1 year ago
Allow for the const keyword to be used in trait impls. This can be used to implement const traits on nightly, for example:
const
// this requires a feature gate for now. #![feature(const_trait_impl)] #[rustversion::attr(nightly, const_trait)] trait Foo { fn foo() -> u32; } #[rustversion::attr(nightly, const)] // this turns into `impl const Foo for u32`. impl Foo for u32 { fn foo() -> u32 { 42 } }
Allow for the
const
keyword to be used in trait impls. This can be used to implement const traits on nightly, for example: