Update E0015 explanation, fix E0053.

This commit is contained in:
Nick Hamann 2015-05-27 12:55:33 -05:00
parent 9c303944a7
commit f6074406db
2 changed files with 8 additions and 4 deletions

View File

@ -196,9 +196,13 @@ const Y: i32 = A;
"##,
E0015: r##"
The only function calls allowed in static or constant expressions are enum
variant constructors or struct constructors (for unit or tuple structs). This
is because Rust currently does not support compile-time function execution.
The only function calls allowed in static or constant expressions are
constructors for enum variants and structs, or `const fn`s. Rust currently does
not support more general compile-time function execution.
See [RFC 911] for more details on the design of `const fn`s.
[RFC 911]: https://github.com/rust-lang/rfcs/pull/911
"##,
E0018: r##"

View File

@ -241,7 +241,7 @@ impl Foo for Bar {
fn foo(x: i16) { }
// error, values differ in mutability
fn foo(&mut self) { }
fn bar(&mut self) { }
}
```
"##,