commit
01fd4d6227
1 changed files with 1 additions and 1 deletions
|
@ -66,7 +66,7 @@ with `i32`. It will then use the default value. But, as in `i64`, we can also
|
||||||
add our own definition.
|
add our own definition.
|
||||||
|
|
||||||
Associated constants don’t have to be associated with a trait. An `impl` block
|
Associated constants don’t have to be associated with a trait. An `impl` block
|
||||||
for a `struct` works fine too:
|
for a `struct` or an `enum` works fine too:
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
#![feature(associated_consts)]
|
#![feature(associated_consts)]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue