Commit 8709ac8
authored
Rollup merge of rust-lang#79858 - sasurau4:doc/update-unstable-book-const-fn, r=oli-obk
Update const-fn doc in unstable-book
Fix rust-lang#79691
I couldn't find suitable examples. It seems that `const_fn` feature-gate used only following place. https://github.com/rust-lang/rust/blob/810324d1f31eb8d75e8f0044df720652986ef133/compiler/rustc_ast_passes/src/feature_gate.rs#L560-L562
And example like following emits [E0379](https://doc.rust-lang.org/error-index.html#E0379).
```rust
#![feature(const_fn)]
trait Foo {
const fn bar() -> Self;
}
```
Any other suitable example exists, please let me know.1 file changed
+2
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 9 | + | |
| 10 | + | |
0 commit comments