Fix documentation typo
This commit is contained in:
parent
feb3408f11
commit
519783adb3
1 changed files with 2 additions and 2 deletions
|
@ -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`
|
To enable this feature on a nightly version of rustc, add the `const_fn`
|
||||||
feature flag:
|
feature flag:
|
||||||
|
|
||||||
```compile_fail,E0723
|
```
|
||||||
#![feature(const_fn)]
|
#![feature(const_fn)]
|
||||||
|
|
||||||
trait T {}
|
trait T {}
|
||||||
|
|
||||||
impl T for () {}
|
impl T for () {}
|
||||||
|
|
||||||
const fn foo() -> impl T { // error: `impl Trait` in const fn is unstable
|
const fn foo() -> impl T {
|
||||||
()
|
()
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue