We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
(const)
1 parent e18f475 commit 73e98c4Copy full SHA for 73e98c4
text/0000-const-trait-impls.md
@@ -26,7 +26,7 @@ impl const Default for () {
26
struct Thing<T>(T);
27
28
impl<T: (const) Default> const Default for Thing<T> {
29
- (const) fn default() -> Self { Self(T::default()) }
+ const fn default() -> Self { Self(T::default()) }
30
}
31
32
const fn default<T: (const) Default>() -> T {
@@ -335,7 +335,7 @@ generates
335
336
```rust
337
impl<T: (const) PartialEq> const PartialEq for MyStruct<T> {
338
- (const) fn eq(&self, other: &Rhs) -> bool {
+ const fn eq(&self, other: &Rhs) -> bool {
339
self.0 == other.0
340
341
0 commit comments