mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
Update error code page
This commit is contained in:
parent
9beb6f81e4
commit
b5693a39d9
@ -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…
Reference in New Issue
Block a user