Fix documentation typo
This commit is contained in:
parent
feb3408f11
commit
519783adb3
@ -2388,14 +2388,14 @@ const fn foo() -> impl T { // error: `impl Trait` in const fn is unstable
|
||||
To enable this feature on a nightly version of rustc, add the `const_fn`
|
||||
feature flag:
|
||||
|
||||
```compile_fail,E0723
|
||||
```
|
||||
#![feature(const_fn)]
|
||||
|
||||
trait T {}
|
||||
|
||||
impl T for () {}
|
||||
|
||||
const fn foo() -> impl T { // error: `impl Trait` in const fn is unstable
|
||||
const fn foo() -> impl T {
|
||||
()
|
||||
}
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user