Update error code page
This commit is contained in:
parent
9beb6f81e4
commit
b5693a39d9
1 changed files with 4 additions and 12 deletions
|
@ -3,12 +3,8 @@ An unstable feature in `const` contexts was used.
|
|||
Erroneous code example:
|
||||
|
||||
```compile_fail,E0723
|
||||
trait T {}
|
||||
|
||||
impl T for () {}
|
||||
|
||||
const fn foo() -> impl T { // error: `impl Trait` in const fn is unstable
|
||||
()
|
||||
const fn foo<T: Copy>(_: T) { // error!
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -18,11 +14,7 @@ feature flag:
|
|||
```
|
||||
#![feature(const_fn)]
|
||||
|
||||
trait T {}
|
||||
|
||||
impl T for () {}
|
||||
|
||||
const fn foo() -> impl T {
|
||||
()
|
||||
const fn foo<T: Copy>(_: T) { // ok!
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue