File tree 2 files changed +8
-4
lines changed
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -196,9 +196,13 @@ const Y: i32 = A;
196
196
"## ,
197
197
198
198
E0015 : r##"
199
- The only function calls allowed in static or constant expressions are enum
200
- variant constructors or struct constructors (for unit or tuple structs). This
201
- is because Rust currently does not support compile-time function execution.
199
+ The only function calls allowed in static or constant expressions are
200
+ constructors for enum variants and structs, or `const fn`s. Rust currently does
201
+ not support more general compile-time function execution.
202
+
203
+ See [RFC 911] for more details on the design of `const fn`s.
204
+
205
+ [RFC 911]: https://github.com/rust-lang/rfcs/pull/911
202
206
"## ,
203
207
204
208
E0018 : r##"
Original file line number Diff line number Diff line change @@ -241,7 +241,7 @@ impl Foo for Bar {
241
241
fn foo(x: i16) { }
242
242
243
243
// error, values differ in mutability
244
- fn foo (&mut self) { }
244
+ fn bar (&mut self) { }
245
245
}
246
246
```
247
247
"## ,
You can’t perform that action at this time.
0 commit comments