Rollup merge of #57312 - Mendess2526:master, r=Centril
`const fn` is no longer coming soon (const keyword docs) The `const` keyword [documentation](https://doc.rust-lang.org/std/keyword.const.html) mentions that `const fn`s are coming soon, but they have already been added.
This commit is contained in:
commit
e1a1ab0836
1 changed files with 2 additions and 2 deletions
|
@ -47,8 +47,8 @@ mod as_keyword { }
|
||||||
///
|
///
|
||||||
/// Constants must be explicitly typed, unlike with `let` you can't ignore its type and let the
|
/// Constants must be explicitly typed, unlike with `let` you can't ignore its type and let the
|
||||||
/// compiler figure it out. Any constant value can be defined in a const, which in practice happens
|
/// compiler figure it out. Any constant value can be defined in a const, which in practice happens
|
||||||
/// to be most things that would be reasonable to have a constant (barring `const fn`s, coming
|
/// to be most things that would be reasonable to have a constant (barring `const fn`s). For
|
||||||
/// soon). For example, you can't have a File as a `const`.
|
/// example, you can't have a File as a `const`.
|
||||||
///
|
///
|
||||||
/// The only lifetime allowed in a constant is `'static`, which is the lifetime that encompasses
|
/// The only lifetime allowed in a constant is `'static`, which is the lifetime that encompasses
|
||||||
/// all others in a Rust program. For example, if you wanted to define a constant string, it would
|
/// all others in a Rust program. For example, if you wanted to define a constant string, it would
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue