Skip to content

Commit b5693a3

Browse files
Update error code page
1 parent 9beb6f8 commit b5693a3

File tree

1 file changed

+4
-12
lines changed
  • compiler/rustc_error_codes/src/error_codes

1 file changed

+4
-12
lines changed

compiler/rustc_error_codes/src/error_codes/E0723.md

+4-12
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,8 @@ An unstable feature in `const` contexts was used.
33
Erroneous code example:
44

55
```compile_fail,E0723
6-
trait T {}
7-
8-
impl T for () {}
9-
10-
const fn foo() -> impl T { // error: `impl Trait` in const fn is unstable
11-
()
6+
const fn foo<T: Copy>(_: T) { // error!
7+
// ...
128
}
139
```
1410

@@ -18,11 +14,7 @@ feature flag:
1814
```
1915
#![feature(const_fn)]
2016
21-
trait T {}
22-
23-
impl T for () {}
24-
25-
const fn foo() -> impl T {
26-
()
17+
const fn foo<T: Copy>(_: T) { // ok!
18+
// ...
2719
}
2820
```

0 commit comments

Comments
 (0)